Andrei Alexandrescu wrote: > It looks like there is endless debate on the naming convention for the > range operations.
I had hoped that the endless debate on naming when you first proposed ranges was enough. You were very good then about trying to find a reasonable compromise. Obviously, few people got their preferred naming convention, but at least we had a whole committee to decide on the color of the bicycle shed. I'm not going to vote in a forum like this. There are online polls that you can do which would do a better job. Personally, I think it'd be best to do something like "please rate on a scale of 1 to 5 how much you like the following terms representing 'toe' in the current range design" (worst) (best) toe 1 2 3 4 5 tail 1 2 3 4 5 last 1 2 3 4 5 back 1 2 3 4 5 Something like that would allow doing things like computing the average score of all words. > Few saw the obvious bugs in the documentation and > examples :o). And here I thought is was better to point out bigger things like questionable API's ;) > So please let's vote once and for all. I will note that I disagree we > should ignore what conventions other languages have. Provincialism is > the appurtenance of the incult. To that end, I looked around at how some > languages define some primitives. > > LISP: > car > last > http://www.gigamonkeys.com/book/they-called-it-lisp-for-a-reason-list-processing.html > > Scheme: > car > last > http://merd.sourceforge.net/pixel/language-study/syntax-across-languages-per-language/Scheme.html > > ML: > hd > last > http://www.standardml.org/Basis/list.html > > Ocaml: > hd > no last > http://caml.inria.fr/pub/docs/manual-ocaml/libref/List.html > Apparently Ocaml programmers tend to define their own function called > "last": > http://nodens.physics.ox.ac.uk/~mcdonnell/lab/code/code_ocaml/ocaml_fold/ocaml_fold.html > http://caml.inria.fr/pub/ml-archives/caml-list/2004/04/06d65a793fa0503218c06783be2facbe.en.html > > Haskell: > head > last > http://www.cs.chalmers.se/Cs/Grundutb/Kurser/d1pt/d1pta/ListDoc/head.html > http://www.cs.chalmers.se/Cs/Grundutb/Kurser/d1pt/d1pta/ListDoc/last.html > > C++: > front > back > http://support.microsoft.com/kb/158613 What about my favorite from C++ iterators? * > > Scala: > head > last > http://www.scala-lang.org/docu/files/api/scala/List.html > > C#: > Couldn't find after searching MS's asinine dox for 5 mins. > > Java: > obj.get(0) > obj.get(obj.size-1) > http://java.sun.com/j2se/1.4.2/docs/api/java/util/AbstractSequentialList.html > > Python: > lst[0] > lst[len(lst)-1] > > So please let's vote once and for all. No choice will please everybody, > but I want to settle for something that at least won't displease the > most vehement ones :o). > > > Andrei