Hi Joe, On Wed, Feb 11, 2015 at 5:02 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:
> On Wed, Feb 11, 2015 at 4:54 PM, Joe Watkins <pthre...@pthreads.org> > wrote: > >> So it turns out that invariant is already deprecated in D, they have >> dropped it in favour of immutable properties. >> >> I guess I'll have to install an old version, or try to extract everything >> we need from their obviously outdated documentation ... >> > > That's too bad. > Eiffel uses invariant. > > https://docs.eiffel.com/book/method/et-design-contract-tm-assertions-and-exceptions > http://dlang.org/deprecate.html#invariant as an alias for immutable I think D folks would like to be more strict. Object is great, but state management can be complex. I like immutable also since it prevents modification by mistake. I'm not sure if we should go for it without having invariant. Even if we have invariant, we may have immutable object/scalar in the future. Both are good. Isn't invariant good enough? I don't think Eiffel will drop invariant support in favor of immutables. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net