|
|
|
|
|
by anc2020
5518 days ago
|
|
I appreciate your enthusiasm for correctness, but if I'm reading correctly, the essence of sktrdie's comment was trying to counter the group think that the idea of the article is in some way "bad", "satirical", or "wrong". It may be that I only ever merit to use this pattern once every 10,000 lines, but that in no way makes the idea of calling with reference over primitive values incorrect. Readers should understand the difference between rare and never. |
|
Sure, however the first part of my comment is not intended to address the essence of their comment, so it has no bearing. What they said is incorrect, and in fact a common mistake and I wanted to correct it.
However, I'd also note that what sktrdie is describing is an Array (in Javascript an Array is just an object with numbers for property names and some helper methods).
As far as I can see there is absolutely zero benefit (and many drawbacks) in using the technique outline in the OP article as opposed to just using an Array.
You could get the same result by simply using an Array directly...or if you want to get fancy, add a few simple helper methods.
In this way (and perhaps others) the article is "bad" and "wrong".