Initially, it seems like a silly question. But my goal here is to come up with a more concrete concept about array .
In languages such as JavaScript, array is an object that allows you to add and remove members to a sort of list. This list always has the numbered indexes starting from 0.
In Python, we have something similar to the array of JavaScript, which would be the list and the tuple , except the latter which is a unchanging list but similar.
However, in PHP, array seems to be a mixture of hash (or like Object in JavaScript) with a list.
As my first programming language was PHP, I got used to Array
being what it is in PHP, but when comparing it with the array of Java, JavaScript and other languages, I see that even though they have the same nomenclature, they seem to be different things, creating a confusion of technical terms.
-
But after all, what is an array ? Is a list indexed sequentially? Or is it a container of manually indexed items (as in PHP)?
-
Would it be correct to say that the PHP array array concept is wrong ? If it is "wrong", what would be the most appropriate name for the array of this language?
-
List and array is the same thing? If not, what's the difference?
Related questions: