any news on const/invariant?

Jason House jason.james.house at gmail.com
Thu Nov 29 22:09:55 PST 2007


Janice Caron wrote:

> 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.

I like it too.  It's extremely clear and never ambiguous.



More information about the Digitalmars-d mailing list