Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82449 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68679 invoked from network); 11 Feb 2015 08:10:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 08:10:04 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.176 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.176 mail-pd0-f176.google.com Received: from [209.85.192.176] ([209.85.192.176:42357] helo=mail-pd0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/2E-33902-B5E0BD45 for ; Wed, 11 Feb 2015 03:10:03 -0500 Received: by pdbfp1 with SMTP id fp1so2837962pdb.9 for ; Wed, 11 Feb 2015 00:10:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=p9SvFMUBqtp+amH+Z9v6RgQ3x3VHNmqpU5hy9hWEhyo=; b=LLQmOcDwfbMa6kCXzRX8cimi/JZbM/HkXya822e2NAVl6Irq7j/Zjyswbl1vZlV7r6 CxEDyd6H7AxgSweiNPAWdEhzvlvc0RV7OS3EK5AZzqY7m+U/9GVFMKoLekVCsKaadORH 8eq/ybugqNhBYl7sEaLurXVw9Y9HgLM5UAU/nB82Q6DPOn8HoTL1NkBjTYp/HwOhJ0CH cZzX/vOD4HegMU3Yno5ivn08pY3VflApH8wiNXPjZL2lkINDJYBLStjpxagu7L1asZhx A/KKQtOyY6dtSEJGxdh64ePpPClXtx1usA/VMLK0+v5olfzHRb4Pt0f6nxhmJGzB0p0d ob9A== X-Received: by 10.70.103.162 with SMTP id fx2mr7328871pdb.24.1423642200352; Wed, 11 Feb 2015 00:10:00 -0800 (PST) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id tn2sm142727pbc.15.2015.02.11.00.09.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Feb 2015 00:09:59 -0800 (PST) Message-ID: <54DB0E55.9000207@gmail.com> Date: Wed, 11 Feb 2015 00:09:57 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Dmitry Stogov CC: Joe Watkins , Yasuo Ohgaki , =?UTF-8?B?RnJhbsOnb2lzIExhdXByZXRyZQ==?= , PHP Internals References: <54DAFD32.3000005@gmail.com> <54DB0BC0.20304@gmail.com> In-Reply-To: <54DB0BC0.20304@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Design by Contract From: smalyshev@gmail.com (Stanislav Malyshev) 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