On Wednesday, 8 July 2015 at 09:25:19 UTC, Mike Parker wrote:
On Wednesday, 8 July 2015 at 09:00:58 UTC, Jonathan M Davis
wrote:
Personally, I'd prefer List over Seq,
Given that "list" has meanings other than "linked list" in
several languages (Python and Racket come to mind), I don't see
the problem.
Yep C# too: List<T> is arguably the most used collection in the
language, and it's indexable and not linked.
"In computer science, a list or sequence is an abstract data
type that represents a sequence of 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.
The name list is also used for several concrete data structures
that can be used to implement abstract lists, especially linked
lists."
Given the nature of the data structure we're talking about, I
think AliasList is a perfect fit. It's shorter than Sequence
(the only good alternative I see atm) and List is a whole word,
unlike Seq. More importantly, it's quite descriptive. Because
of the baggage surrounding "tuple" in D and the use of "array"
to already refer to static arrays and dynamic arrays/slices
(and a data type in Phobos) I don't see either of those as
viable options.
Yep, I totally agree. The term "list" largely depends on context,
but even in the software development domain it can be interpreted
analagously to "grocery list" or "todo list". Vetoing AliasList
leaves us with nothing good.