toji/gl-matrix — Issue #4: The .set method's argument order is somewhat confusing
Author: kevingadd
Created: 2011-10-26 00:27:12+00:00
State: open

For the most part, destination as an optional last argument seems to work well in this library. However, for the .set operations, it's a bit confusing, at least for me. Here's why:

For all the binary operators, you have them defined more or less like this:
type.operator = function (lhs, rhs, result)
this roughly corresponds to 'result = lhs operator rhs'.

However, for the set operation - which at least in my case, I think of mentally as the 'equals operator', the definition is:
type.set = function (rhs, lhs)
which corresponds to 'lhs = rhs'.

I spent about 15 minutes tripped up by this and I keep making this mistake as I write more code using gl-matrix. Can you think of any ways to address this? I can see how it might be better to keep dest as the last argument, for consistency.