DEV Community

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

Collapse
 
joshualjohnson profile image
Joshua Johnson

Be careful falling into what you live vs. what works best for the solution. Many times, using an array might make you fall into an anti-pattern you won't be able to support. For example, when your dataset requires a map data structure, or a graph data structure, you can't very easily replicate those in an array in most languages.

Collapse
 
genta profile image
Fabio Russo

That’s hm... obvious ? 😄

Collapse
 
dmerand profile image
Donald Merand

Obvious to whom? I found these examples, which you didn't mention in your article, to be a helpful caveat.

Thread Thread
 
genta profile image
Fabio Russo • Edited

They’re... I can put those in the article if it’s ok for him.