Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Huh? the same he means, able to reference a collection of otger objects? because this the only way they are similar.
-
@samblaise Main difference is that arrays have a fixed dimension, lists do not.
@magicMirror Nope, I wish he really did it mean that way... he believes that they are implemented and work in the exact same way, which is quite inaccurate even though the fundamental principle of those structures is very similar. -
There is nothing similar between those three. Any two have similarities, but all three? nope.
-
elazar10308y@magicMirror then he is precise and correct. These are the same thing in different languages.
-
elazar10308y@TheItalianGuy It's sad that you mock someone by exposing you own lack of knowledge. If you don't know how these are the same, you can simply ask.
-
elazar10308yI think I know: one should not assume that other people are stupid. Forgetting to add a single word is more likely.
-
@elazar I am sorry for the misunderstanding. He was saying that all three things are EXACTLY the same under all aspects, which is not true.
-
elazar10308y@TheItalianGuy was he talking about vector and ArrayList? If so, they are as similar as one can expect from different languages, and considering C++'s value semantics and templates - otherwise comparison is almost meaningless to begin with.
In other words, the answer to "what is the equivalent of Python list in Java" is ArrayList, etc. -
@elazar Since Python is the language they teach us in school, he was comparing Python's lists to Java arrays and C++'s Vectors, by saying they all have the same exact characteristics.
I do agree there are some similarities between the structures you mentioned, but saying they are the exact same of python lists is pretty unprecise. -
elazar10308y@TheItalianGuy they have the same runtime characteristics, up to minor differences. Same asymptotic complexity and similar memory locality.
They are all implementations of the data structure known as dynamic array (or growable array). The underlying implementation and the basic interface is as similar as one can expect. Of course, there are differences because different people implemented them in different environments, but this is obvious.
Related Rants
"C Vectors, Python Lists and Java Arrays are all the same things!" - my IT professor.
He's really talented... :D Don't you guys think? And the fun part is that these "gems" are quite common lately...
I hope I'll graduate soon ;_;
undefined
itprofessor
help
italian education