Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82454 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76034 invoked from network); 11 Feb 2015 08:19:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 08:19:33 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qa0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:40185] helo=mail-qa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/DF-33902-3901BD45 for ; Wed, 11 Feb 2015 03:19:31 -0500 Received: by mail-qa0-f42.google.com with SMTP id w8so1237063qac.1 for ; Wed, 11 Feb 2015 00:19:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=mxnbQsah7cXDmuzlJ8xF4JxPYIHTGtKZyK1+RPyrcQs=; b=zVW8xRUcckj2AN+5lp89AMca8n4Ay4iVw7FB4qwHZZh/FEXBjfYdDSDW3HXo1cszbk Ajfh5vwlNV5Vk/2RRuIOlHM0iepDdQOb++1XnBgvMfGupr87Wj2ZZGHmfN5gAVCAJUz8 0WUkflqEybcd0dxqIIXWc1s1a9r4GAojmGW4BLUSdwL6v7Wqx7dFGR4eeFLbEiJTJTOM omrWzCGgIAwY/Z01qumRSEGT2rMudGfXCiSrsfQRi6E4YTdYJ35sGfo8Ib2/JLw7wUuZ Rq2t9Y4ECim0l+KzW17y447H/jkGeIh/MByFdi9TgvlDmPyCdvO5U5iOrRR3zunzDi/c Mo9A== X-Received: by 10.224.53.194 with SMTP id n2mr18379660qag.21.1423642768931; Wed, 11 Feb 2015 00:19:28 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.250.195 with HTTP; Wed, 11 Feb 2015 00:18:47 -0800 (PST) In-Reply-To: References: <54D7ED22.3080001@gmail.com> Date: Wed, 11 Feb 2015 17:18:47 +0900 X-Google-Sender-Auth: DLIgntl22hDRsYGm8v2mG2ORRow Message-ID: To: Joe Watkins Cc: Dmitry Stogov , Patrick Schaaf , internals Content-Type: multipart/alternative; boundary=001a1132f74487815d050ecba984 Subject: Re: [PHP-DEV] Design by Contract From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1132f74487815d050ecba984 Content-Type: text/plain; charset=UTF-8 Hi Joe, On Wed, Feb 11, 2015 at 5:02 PM, Yasuo Ohgaki wrote: > On Wed, Feb 11, 2015 at 4:54 PM, Joe Watkins > 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 yohgaki@ohgaki.net --001a1132f74487815d050ecba984--