simont: A picture of me in 2016 (Default)
simont ([personal profile] simont) wrote2013-03-14 03:16 pm

Do I it means means not that think think what you

Inspired by completely mistaking the meaning of a class name this week ...
Poll #13035 Hey, I ordered a cheeseburger
Open to: Registered Users, detailed results viewable to: All, participants: 26


I would take the phrase "ordered pair" to mean

View Answers

A pair (a,b) in which a <= b always
3 (11.5%)

A pair (a,b) in which (a,b) and (b,a) count as different unless a=b
19 (73.1%)

I would always ask which one you meant
3 (11.5%)

SEWIWEIC
1 (3.8%)

I would take the phrase "ordered list" to mean

View Answers

A list which is in order according to some sorting criterion, e.g. alphabetical
19 (73.1%)

A list in which order is significant, i.e. [1,2] and [2,1] are interestingly distinct
5 (19.2%)

I would always ask which one you meant
2 (7.7%)

SEWIWEIC
0 (0.0%)

I would take the phrase "ordered collection", in the context of data structures, to mean

View Answers

A data structure which keeps elements in an order determined by some sorting criterion
9 (36.0%)

A data structure which considers the order of elements to be an important part of what it's remembering
11 (44.0%)

I would always ask which one you meant
5 (20.0%)

SEWIWEIC
0 (0.0%)

ptc24: (Default)

[personal profile] ptc24 2013-03-14 03:25 pm (UTC)(link)
For my mind:

An "ordered pair" pings the "fixed phrase" part of my mind.
A "list", strictly speaking, implies a data structure in which order is preserved. However, people can use lists for data where order is irrelevant, to represent a bag (or even a set), so there's an ambiguity there.
A "collection" is a very general concept, so there's vagueness there.
ptc24: (Default)

[personal profile] ptc24 2013-03-14 03:37 pm (UTC)(link)
Thank goodness we have "bunch" which isn't the formal term for any data structure... I hope.

[identity profile] deliberateblank.livejournal.com 2013-03-14 08:43 pm (UTC)(link)
Clearly it refers to a tree with no particular arity constraints, where the leaf nodes are all spherical.
ewx: (Default)

[personal profile] ewx 2013-03-14 03:42 pm (UTC)(link)
SEWiwhatnow?
ewx: (Default)

[personal profile] ewx 2013-03-14 03:42 pm (UTC)(link)
Oh, got it. NM.
hilarita: stoat hiding under a log (Default)

[personal profile] hilarita 2013-03-15 12:22 am (UTC)(link)
I used a search engine to find out what it meant.
jack: (Default)

[personal profile] jack 2013-03-14 03:53 pm (UTC)(link)
Huh, I never noticed that before. I think it's normally unambiguous because people don't normally say the opposites.

(I wouldn't always ask about "ordered collection" -- most likely it would be clear from context you were generalising pair or generalising list, but if it wasn't clear I'd ask.)
sparrowsion: tree sparrow (tree sparrow)

[personal profile] sparrowsion 2013-03-15 12:07 pm (UTC)(link)
I guess you missed out on the near-intractable arguments prior to the introduction of OrderedDict as to exactly what an "ordered dictionary" meant. I think in the end the interpretation that won out did so because the behaviour you want is pretty easy to get with sorted(dict.keys()) etc, rather than it being more obvious or useful.
holdthesky: (Default)

[personal profile] holdthesky 2013-03-14 06:28 pm (UTC)(link)
A pair (a,b) in which a <= b always : A range.

A pair (a,b) in which (a,b) and (b,a) count as different unless a=b : An ordered pair.

A list which is in order according to some sorting criterion, e.g. alphabetical: An ordered list.

A list in which order is significant, i.e. [1,2] and [2,1] are interestingly distinct: A list (as opposed to a bag).

A data structure which keeps elements in an order determined by some sorting criterion: A sorted list.

A data structure which considers the order of elements to be an important part of what it's remembering: An ordered list.

For me "ordered" means: a thing whose components are not interchangeable and, incidentally, are often represented positionally to determine which is which; whereas "sorted" means: some sorting criterion is invariantly true on operations. So [1,2] and [2,1] are ordered (if they differ in identity) but only [1,2] is sorted by the usual sorting on integers.
hairyears: A disturbing close-up of a caterpillar's foot, resembling a devouring orifice. The foot's owner is small, hairy, and venomous (SEM Image of Spilosoma virginica Foot)

[personal profile] hairyears 2013-03-15 01:39 pm (UTC)(link)
I note that only one comment (so far) has drawn tbe distinction between 'ordered' and 'sorted'.

I hope I'm the only person here who sees a < b and prays to Great Cthulhu that I 'm not going to waste more time debugging code in which some misguided genius believes that 'Less Than' is a meaningful comparison operation for strings outside the task domain of alphabetical sorting.