[C++-sig] GNU gettext and "_"

David Abrahams david.abrahams at rcn.com
Thu Jun 20 15:51:12 CEST 2002


From: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com>


> --- David Abrahams <david.abrahams at rcn.com> wrote:
> > I'm working on slicing now and I find myself in need of a way to
represent
> > x[:y]. This is technically not equivalent to x[0:y] since you can slice
on
> > any type. "Obviously", the answer is to use
> >
> >     x.slice(_,y)
>
> x.slice(open_interval_left(y))
> x.slice(open_interval_right(y))

Yikes, Ralf! The whole point of this is that it should be convenient and
mirror Python syntax!
If we have to, I would prefer:

    x.slice(y,z)
    x.slice_from(y)
    x.slice_to(z)

though

    x.slice(y,_)
    x.slice(_,z)

seems much clearer to me.

__import__('Somerville').Dave








More information about the Cplusplus-sig mailing list