Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82428 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35630 invoked from network); 11 Feb 2015 07:11:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 07:11:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.192.173 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.192.173 mail-pd0-f173.google.com Received: from [209.85.192.173] ([209.85.192.173:41602] helo=mail-pd0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/E6-33902-BA00BD45 for ; Wed, 11 Feb 2015 02:11:39 -0500 Received: by pdno5 with SMTP id o5so2571757pdn.8 for ; Tue, 10 Feb 2015 23:11:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=pTkksBBUaKZgAV0gMWV1XS9NSWa6IKYsQsJxyNbSPUQ=; b=IpNXERwXPZ8xF8CPzZCpOALTOSjkgNYSsSg1LD2Se2aJtV+QGY6WQjmqk/lGST9p// 9GTaXuddFxH6KJtMZcdjG9wsspOw/bUItAvzJIc1dRTyHF50VgFhNCDpCiq8PYa0aEXq QdMIwc3n9QAGn9ChDmTCfTl6dvknMw1cjSlICQJ2PaTSaxWJgQTfXiSBngb7jISpfcdz YHgo5ClknAGo7ktw5U/gmCoZTJMzeIz/5C2yCFUDQQuBlH6aOMbDMBOt5VuM1YdZI7S3 9p8M6tu4rUm3QmhwedPNdunF6CuGhiL7SQ4NVCU4dov0Oc+m/qc0rBbRKDBtCtTVLcGL zClQ== X-Gm-Message-State: ALoCoQnQMmgn1dIIX5pL+B2LuKm4rbF0jASgId4bYQUblax+iXZ1HEnFbj0rZZ6UMVG2B7AG4cO6 MIME-Version: 1.0 X-Received: by 10.70.42.47 with SMTP id k15mr44502144pdl.134.1423638696920; Tue, 10 Feb 2015 23:11:36 -0800 (PST) Received: by 10.70.49.100 with HTTP; Tue, 10 Feb 2015 23:11:36 -0800 (PST) X-Originating-IP: [109.145.22.92] In-Reply-To: <54DAFD32.3000005@gmail.com> References: <54D7ED22.3080001@gmail.com> <54DAFD32.3000005@gmail.com> Date: Wed, 11 Feb 2015 07:11:36 +0000 Message-ID: To: Stanislav Malyshev Cc: Yasuo Ohgaki , Dmitry Stogov , =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , PHP Internals Content-Type: multipart/alternative; boundary=047d7bfe9e40d1a0da050ecab661 Subject: Re: [PHP-DEV] Design by Contract From: pthreads@pthreads.org (Joe Watkins) --047d7bfe9e40d1a0da050ecab661 Content-Type: text/plain; charset=UTF-8 > I think reusing syntax for existing operator in completely unrelated context is a big mistake. I keep hearing that, I agree, but adding keywords presents it's own problems. The keywords can always be changed, maybe they can be a voting option even. Cheers Joe On Wed, Feb 11, 2015 at 6:56 AM, Stanislav Malyshev wrote: > Hi! > > > Please steer clear of using the assert API, and in so doing avoid BC > > concerns with the current assert API. > > The operator can be called something other than "assert", I'm sure the > thesaurus has a lot of possibilities. > > > Please avoid adding a magic method and use the suggested syntax for > > invariant. > > > > class Some { > > require(invariant-expr); > > I think reusing syntax for existing operator in completely unrelated > context is a big mistake. Having code outside of functions is probably > not the best idea too. > > -- > Stas Malyshev > smalyshev@gmail.com > --047d7bfe9e40d1a0da050ecab661--