RFC on range design for D2
Leandro Lucarella
llucax at gmail.com
Tue Sep 9 07:34:16 PDT 2008
Andrei Alexandrescu, el 9 de septiembre a las 07:47 me escribiste:
> Lionello Lunesu wrote:
> >"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
> >news:ga46ok$2s77$1 at digitalmars.com...
> >>I put together a short document for the range design. I definitely missed
> >>about a million things and have been imprecise about another million, so
> >>feedback would be highly appreciated. See:
> >>
> >>http://ssli.ee.washington.edu/~aalexand/d/tmp/std_range.html
> >This is just awesome. Thank you for tackling this issue.
> >I agree with others that some names are not so obvious. Left/right? How do
> >Arabic speakers feel about this : ) Begin/end seems more intuitive.
>
> I don't know of that particular cultural sensitivity. Begin and end are
> bad choices because they'd confuse the heck out of STL refugees. c.left
> and c.right are actually STL's c.front() and c.back() or *c.begin() and
> c.end()[-1], if you allow the notational abuse. But I sure hope some
> good names will come along.
I think STL refugees can deal with it. I think there is no point on keep
compromising D's readability because of C/C++ (you just mentioned enum,
another really bad choice to keep C/C++ refugees happy).
I find left and right a little obscure too, it all depends on your mental
image of a range. Using front/back or begin/end is much more clearer.
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
MP: Qué tengo? B: 2 dedos de frente.
MP: No, en mi mano, Bellini. B: Un acoplado!
MP: No, escuche bien, eh... B: El pelo largo, Mario...
Se usa en la espalda.
MP: No! Es para cargar. B: Un hermano menor.
MP: No, Bellini! Se llena con B: Un chancho, Mario...
cualquier cosa.
MP: No, Bellini, no y no!
-- El Gran Bellini (Mario Podestá con una mochila)
More information about the Digitalmars-d-announce
mailing list