Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83505 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86527 invoked from network); 22 Feb 2015 23:17:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2015 23:17:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.177 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.177 mail-pd0-f177.google.com Received: from [209.85.192.177] ([209.85.192.177:43909] helo=mail-pd0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/AC-18531-C636AE45 for ; Sun, 22 Feb 2015 18:17:02 -0500 Received: by pdev10 with SMTP id v10so21022898pde.10 for ; Sun, 22 Feb 2015 15:16:57 -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=5eHjethrBo87mt3YwDkDZhYKZnr6j5PcZc+9UL6Kfa4=; b=R4KszTN7b4F5CVvPhYjS1Fg2jYbJaHA1G0YkUf/FENxO4Tc6DjuUdFcta39+K+Wwhv bzqfbNsOfHVlFjFyyo7+m55l5FbFXVeT1VOO9i7dsF+gsev8e7R7e7FANw1AIFuVk7MW uFz2XiRfPyxa9Whna6rckd4NgjNvG5B26yFqU+MnkH0RNjKnEHnm8Sw0R69RGESEahnM seDIURJ5PWBtIm3ZRsFaScIK7hPJGEX9YZjSNf4Lm1F2H7tdEk4LM+yoRVrj8X/9aVC7 298dnFkMS5USPb54J3cG5XKnlnn/iXbCpu3jtvqzNx9OEivr5ML0Qg8oLJjWH3lvV7Gm uqUQ== X-Received: by 10.70.36.75 with SMTP id o11mr14296488pdj.107.1424647017690; Sun, 22 Feb 2015 15:16:57 -0800 (PST) Received: from [192.168.2.145] (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id vf6sm24201399pbc.18.2015.02.22.15.16.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Feb 2015 15:16:57 -0800 (PST) Message-ID: <54EA6367.8040508@gmail.com> Date: Sun, 22 Feb 2015 15:16:55 -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: Pierre Joye CC: PHP internals References: <54E5F77D.9090406@fischer.name> <54E6F48A.9040906@fischer.name> <54E72FE7.9030803@googlemail.com> <54E7312D.9090404@googlemail.com> <54E73E70.5020403@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Expectations From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > I do not see much gain today to "improve" them while I do not see why we > should not. It does not hurt. The gain is simple - today, assertions have costs so people that are performance-conscious (rightly or wrongly) use them less than they could. We can make them cost-less in production, while preserving their advantages in the test environments (also makes code easier to follow btw if asserts show which invariants are being enforced). Unit tests only provide for assertions in test code, but cost-less asserts can help you ensure that code works the way you intended all the way through, without paying for that with performance. -- Stas Malyshev smalyshev@gmail.com