Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82425 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30677 invoked from network); 11 Feb 2015 07:05:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2015 07:05:28 -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.172 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.172 mail-pd0-f172.google.com Received: from [209.85.192.172] ([209.85.192.172:44628] helo=mail-pd0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 83/C5-33902-73FFAD45 for ; Wed, 11 Feb 2015 02:05:27 -0500 Received: by pdbft15 with SMTP id ft15so2518098pdb.11 for ; Tue, 10 Feb 2015 23:05:24 -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=vaIOG6Uy5016kQSI/vKvO+3SWkwSiwdHtOFaBlIjFMk=; b=Xudb7lFLZjnihwBy9b+VoFDbUVB9EfiEp7Xs8tbAUs/VecFQDJSjoEH7nvHZ6x28wm +BWoN0JHWxtWGE3EnnAIMtEwYuVy5wB8Df6M7icedQOBhxFfoicncP+dVLzMZWPjqcf+ d1HiGjhJz2o8B0WiE0s8a69ac6F+jiLK8irfJ4GsMKDUBKNWz3U/Qg+JqhfBq0pg3YoO WR/V+h5aCbSomWL/wEERGG9dJPaJ9KGlnXav61mwA2yfE7BDx+76ZTWAoqMhMc8ZFLec vSe2sLtualeEsJf9/2lCCvUNKkIXL+i6yZPvbgAKtSEjWDEPw4w/eOMfhwCdKUVoCwqe KJDw== X-Received: by 10.66.252.67 with SMTP id zq3mr43960555pac.60.1423638324149; Tue, 10 Feb 2015 23:05:24 -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 l3sm21303337pdc.46.2015.02.10.23.05.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Feb 2015 23:05:23 -0800 (PST) Message-ID: <54DAFF30.6090004@gmail.com> Date: Tue, 10 Feb 2015 23:05:20 -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: Alexander Lisachenko CC: PHP internals list References: <54D7ED22.3080001@gmail.com> <54D9DE4B.7030509@lsces.co.uk> In-Reply-To: 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! > Hello, internals! > > DbC is good thing, but the way you want to do this via language changes is > really awful. Why do you want to add more custom features into the Agreed here. I still don't see what's wrong with just putting the code at the beginning of the function and whenever you want to check it. Why this need to change the language syntax? OK, you don't like assert because it's limited or performance-costly or whatever. We can fix that. Why we need weird syntax that places function code in three different places, reuses existing syntax constructs for things that have nothing to do with their original use and look like Perl YAPH signature? I understand implementing fashionable concepts is fun, but must they come with weird syntax? Why can't we keep it simple? -- Stas Malyshev smalyshev@gmail.com