any news on const/invariant?

Janice Caron caron800 at googlemail.com
Tue Nov 27 12:11:20 PST 2007


On 11/27/07, David Gileadi <foo at bar.com> wrote:
> While maybe a bit of typing, I really like the const(this) form--its
> intent is very clear IMHO.  And
>
> const(this)
> {
>      int foo();
>      int bar();
> }
>
> isn't too bad either.

For what it's worth, I completely agree with this. I think it's a fine
syntax, and makes the intent very clear. It can go at the front of a
function without any confusion, it's obvious what it means, and the
extention to invariant(this) is equally as obvious. In the extreme
unlikelihood that I have a vote, this one gets mine.



More information about the Digitalmars-d mailing list