Latest const expansion

Janice Caron caron800 at googlemail.com
Tue Sep 11 11:15:59 PDT 2007


On 9/11/07, Yigal Chripun <yigal100 at gmail.com> wrote:
> my proposal is to simply use the terms tail/head, so the syntax will be
> [head|tail] const (T) | const T
>
> for example:
> head const (C) c; // c is const but c.x isn't
> tail const (C) c; // c is mutable but c.x is const
> const (C) c; // as before, both c and c.x are const
> head const C c; // Error
> tail const C c; // Error

head and tail are good variable names, so I'd rather they didn't
become reserved words.

But I've no problem with headconst and tailconst.

Only ... would that mean we'd then also have to have a tailtailconst?



More information about the Digitalmars-d mailing list