understanding structures

Ok, so for the longest time I didn’t understand lists because when people would describe them in tutorials or on StackOverflow they would just say something vauge or ambiguious such as “we’ll just make a list”. Now I know what a list is in the everyday sense in which it is used, and to be fair it isn’t to different in the CS sense. I honestly like Wikipedia’s explanation:


In computer science, a list or sequence is an abstract data type that represents a countable number of ordered values, where the same value may occur more than once. An instance of a list is a computer representation of the mathematical concept of a finite sequence; the (potentially) infinite analog of a list is a stream.[1]:§3.5 Lists are a basic example of containers, as they contain other values. If the same value occurs multiple times, each occurrence is considered a distinct item.


It sounds strange but it honestly didn’t occur to me before now to look up what a list was in conjunction with CS, I just kind of had the ignorance of what lists were in regards to CS. I also erroneously assumed for a while that a list and a/an (traditional) array were synonymous, when in fact they are not, because a list is finite whereas a list (is supposed to be) dynamic. Again from Wikipedia:


As the name implies, lists can be used to store a list of elements. However, unlike in traditional arrays, lists can expand and shrink, and are stored dynamically in memory.


Now I know better.

Written on June 27, 2017