Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82451 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71629 invoked from network); 11 Feb 2015 08:14:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 08:14:15 -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.220.51 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.220.51 mail-pa0-f51.google.com Received: from [209.85.220.51] ([209.85.220.51:46991] helo=mail-pa0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/DE-33902-75F0BD45 for ; Wed, 11 Feb 2015 03:14:15 -0500 Received: by mail-pa0-f51.google.com with SMTP id eu11so2448895pac.10 for ; Wed, 11 Feb 2015 00:14:12 -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=OPhWdCDqhF469k8oGb1DyTR9+gpVDT6VsHuTFnefObU=; b=Q+fI68AJNcpJpqovt8AzregdCmb3/wQ0KEfPePWX1RcixUFClJirJLN+nTsDpKg9sH Kp0p027WWDEZPcCFUa4RVky1768UnD4S19T+Y16i1v9eEW3WUsNrJDYUngLHdn6BSoLH xDFzL9NXLi0Fo/zNQIYqEMTLUCgQZ6ty8yQb8/RXv9ZkZFpstTjOaVIuMh4CkAISTsNy SNXTffpOsrjuXEkqbCElrThufVlieyJ1mM9plwcf+27audlDtNUtCP9nFDPcRxNkPPGB 7431hAszd2O28iFAt/W/7479AaZQEk5/HnjGHaIfEoANQ2pNgSqsZjM02sPtbVvmfC+4 9jlw== X-Gm-Message-State: ALoCoQklrzYB28uuctkKBxWat9VhbJUThz+sD1HEsz1VLsNG06/UgTuj7gSRQuisAdMZpaja4st7 MIME-Version: 1.0 X-Received: by 10.70.27.33 with SMTP id q1mr44943819pdg.84.1423642452621; Wed, 11 Feb 2015 00:14:12 -0800 (PST) Received: by 10.70.49.100 with HTTP; Wed, 11 Feb 2015 00:14:12 -0800 (PST) X-Originating-IP: [109.145.22.92] In-Reply-To: References: <54DAFD32.3000005@gmail.com> <54DB0BC0.20304@gmail.com> <54DB0E55.9000207@gmail.com> Date: Wed, 11 Feb 2015 08:14:12 +0000 Message-ID: To: Stanislav Malyshev Cc: Dmitry Stogov , Yasuo Ohgaki , =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , PHP Internals Content-Type: multipart/alternative; boundary=047d7bd77068ad1361050ecb9636 Subject: Re: [PHP-DEV] Design by Contract From: pthreads@pthreads.org (Joe Watkins) --047d7bd77068ad1361050ecb9636 Content-Type: text/plain; charset=UTF-8 > OTOH, don't our new parsing improvements allow us to handle syntax like this without introducing a keyword that would be forbidden as class/function name Not that I am aware of, the AST stuff didn't touch the parser like that, it has the same limitations it had before AFAIK. Cheers Joe On Wed, Feb 11, 2015 at 8:12 AM, Joe Watkins wrote: > > Just a thought - what about something like __pre/__post? We own __*, so > no BC problems. > > I'm not married to the words being used, at all. > > I think this is a good idea, we would need __pre, __post , and > __invariant, or some combination of three. > > Any objection to using __ prefixed names, and any other suggestion for > them, or just use the above ? > > Cheers > Joe > > > On Wed, Feb 11, 2015 at 8:09 AM, Stanislav Malyshev > wrote: > >> Hi! >> >> >> function foo($a) >> >> require($a >= 0) >> >> { >> >> } >> > >> > This is a step better but still we have the similar issues with >> > readability, to which reuse of 'require' is added. >> >> Just a thought - what about something like __pre/__post? We own __*, so >> no BC problems. >> OTOH, don't our new parsing improvements allow us to handle syntax like >> this without introducing a keyword that would be forbidden as >> class/function name? The context is pretty unambiguous here. >> -- >> Stas Malyshev >> smalyshev@gmail.com >> > > --047d7bd77068ad1361050ecb9636--