Invariant -- question #2

Bill Baxter wbaxter at gmail.com
Tue Oct 21 06:43:59 PDT 2008


On Tue, Oct 21, 2008 at 10:25 PM, KennyTM~ <kennytm at gmail.com> wrote:
> Bill Baxter wrote:
>>
>> Does using immutable for things that won't change mean that the
>> compiler will eventually revert back to accepting the D1 function-like
>> syntax for class invariants?
>>
>> I.e.
>>  invariant() {  some stuff  }
>> Instead of
>>  invariant { some stuff }
>>
>> Not a huge deal for me.  I was just curious.  I seem to remember
>> people saying this was one thing that made it hard to write code that
>> is portable between D1 and D2.
>>
>> --bb
>
> but
>
>  invariant() { ... }
>
> is valid in D1 when D2 was released, isn't it?
>

I'm not really sure what the deal is right now.  Partly why I was
asking.  It's not a feature I use much, so I'm curious if the DbC fans
think it should change back to the original syntax once it can.

--bb



More information about the Digitalmars-d mailing list