News for hackers. Stuff that matters.
Re:Javascript Pointers by gildas on Monday May 09, 2011 @02:39PM (#2529722)
Re:Javascript Pointers by KirinDave on Monday May 09, 2011 @03:33PM (#2529893)
What problem does this solve? What problem do either of these ideas solve? Is the question, "What is the best way to troll programmers on the internet?"
Re:Javascript Pointers by gildas on Monday May 09, 2011 @03:39PM (#2529917)
I wish it was the case...
Re:Javascript Pointers by boucher on Monday May 09, 2011 @02:44PM (#2529730)
It's not exactly fair to call either technique pointers, but the original could be useful for more things than just this (though this is probably the intended use case).

The linked article, however, makes no sense. The author does not seem to understand how JavaScript works. Arrays are not copied when passed to another function.

Re:Javascript Pointers by anc2020 on Monday May 09, 2011 @02:52PM (#2529754)
This article is incorrect, arrays are passed by reference since they are objects. I've added a comment on the blog.