DEV Community

Discussion on: objects? No... array, please!

Collapse
 
jhbertra profile image
Jamie Bertram

Hum, I find this odd... I also don't think this article gives a complelling reason to back up the claim (a claim which I do not agree with at all)... isn't this more or less unstructured programming? And how do you reliably work with arrays? Conventions for what index a given field should be present in? Seems dangerous and easy to screw up.

Collapse
 
genta profile image
Fabio Russo

These are tools...
You can use It... you can also chose not to use It.
It’s not an article on what is better.
But I can understand your point of view

Collapse
 
jhbertra profile image
Jamie Bertram

Absolutely, arrays are tools, essential ones! I guess it isn't obvious what the point of the article is... it reads like you're advocating packing data into arrays rather than data structures with named fields.

Thread Thread
 
genta profile image
Fabio Russo

That’s why there’s a bold P.S. at the end of It.
If you’re conscious, you can chose to do It and use arrays.
If you dunno the differences, first you should learn those.

I use these tools when I work with the DOM or with very small amounts of data. Just to solve some problem I won’t care in the future about.

Thread Thread
 
jhbertra profile image
Jamie Bertram

Ok I understand, that makes sense. Obviously for experimentation anything goes, and if arrays help you visualize the data then that's a neat perspective on how to use them!

Like I said, the article doesnt make this idea very clear, which is probably what lead to all the confusion in the comments.

Thread Thread
 
genta profile image
Fabio Russo

I’ve to agree... I’ll do better next time.