elm-community / webgl

Moved to elm-explorations/webgl
https://package.elm-lang.org/packages/elm-explorations/webgl/latest
BSD 3-Clause "New" or "Revised" License
131 stars 18 forks source link

Resolve the deps in real time #14

Closed w0rm closed 7 years ago

w0rm commented 7 years ago

In order for things to not break unexpectedly, all native deps have to be resolved in real time and not when the module closure is evaluated.

I decided to inline deps for the texture loading (because they are only used once) and wrap frequent things in functions in order to avoid the repetition of _elm_lang$core$ names.

With this approach we can still use eslint to find out if something is not used or a function is not defined. If all these methods were in a namespace, then eslint wouldn't be able to help us.

w0rm commented 7 years ago

@eeue56 I wanted to come up with something clever, but ended up with the dumbest possible solution :)