Open studej opened 9 years ago
I am done with description of this issue. You can read it :)
bump
negative list indices are not part of Snap's design, so don't rely on them. If - in some instances - they produce something else than an error that's only because I'm not (yet) asserting a valid range (same as using floating point indices, btw) in the list primitives, and that is purely for performance reasons.
Using negative index in some list primitives let you work with items from list tail. This can be really handy thing, but it is not consistent for all list primitives and it has also some other problems.
Please, visit THIS project for demonstration.
Question: Should Snap! let user work with list items from its tail by using negative index? A) If yes, then EVERY primitive should do the same thing B) if no, then we should take care about passed values into numeric inputs