Skip to main content

All Questions

Tagged with
-2 votes
3 answers
138 views

What are the pros and cons of different combinations of objects and arrays for data storing?

From the article JavaScript 2D Array – Two Dimensional Arrays in JS, I see one way to store data is to put all properties of each element into one array: let dataRepresentation1 = [ ['John Doe', ...
Ooker's user avatar
  • 325
4 votes
4 answers
905 views

When should tuples be used as an argument instead of an array?

I hope this isn't too off-topic/opinion-based, I'm new here. I want to pass three elements of the same type into a function. The three elements are unique cards of a deck of cards, so they're not ...
dve.exe's user avatar
  • 59
1 vote
2 answers
610 views

Are there any use cases for List when Deques and Arrays are available?

I've been thinking about this over the past few weeks, and I've come up with no good arguments. My perspective is from Java, but if anyone has any language-specific cases outside of this language, I'...
ndm13's user avatar
  • 229
5 votes
2 answers
520 views

Which design pattern is illustrated by inheriting IStructuralComparable interface?

We know that some design patterns are found so useful that they become features of the language itself. For instance, the interface IEnumerator which is implemented by Array object. This helps in ...
TheSilverBullet's user avatar