← Back to context

Comment by ranit

4 years ago

> but it does so in the same way as writing your programs directly in assembly

> contains lots of magic numbers and very imperative code

Well, we really don't know if the code was written in this form by hand, don't we.

It could have been compiled into this, to use your words, "assembly with magic numbers and imperative" from much more elegant form. We may see this form only because this is what browsers understand.

I am not saying it was compiled, just speculating that seeing pure WebGL does not mean it was pure WebGL to begin with.

Graphics code tends to be imperative and have lots of magic numbers. I suppose it's the math-intensive nature of it.

Personally I'm not a fan of the magic numbers either but as I study more and more of it, it's everywhere