Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82805 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55886 invoked from network); 16 Feb 2015 10:13:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Feb 2015 10:13:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 74.125.82.54 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.54 mail-wg0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:53365] helo=mail-wg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/4C-05176-DD2C1E45 for ; Mon, 16 Feb 2015 05:13:50 -0500 Received: by mail-wg0-f54.google.com with SMTP id y19so28285338wgg.13 for ; Mon, 16 Feb 2015 02:13:46 -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=FInjMzWZjDz+X2fWMTwTKyd50kGf2bcNoqwALCZyWwg=; b=J++R/EAyL4iVdTJWc56L1Fk6/GOLB6MmQF4rKJwOunCYQgdMzg0hdyy+ZxODLGMHcw HRhDAfO4qSVzKjgHJ44wESgL9BQzWsISgSpTqyXXjqDEQcjdH95IBSh2tA6OqAqwdvho S1p1WyXjQBm1sFE4BZpJPXgCtIxCwKdNMeUCfggq6UM6pufqGFNg3jbfrY63uMw/vDAA prkrZw+m0v3tWDfiAnLkDQnrhchTakOS4hM7Ekeze9XjPefHuj+QiX/Lpc0nJA+6Bhka nQWlmWVsixWrpE3mO92EWePTb6172guWKMF8tkzeHPaibKTMH5vmChDZx9jSDA/SeVUd /O7Q== X-Gm-Message-State: ALoCoQnahPiSWNiy9Y0JEJxyLne7eL67dPZtH/BMXoXppDW0yKqDTpZfAi7lcWnTyelnPQcwyHbL MIME-Version: 1.0 X-Received: by 10.194.185.9 with SMTP id ey9mr34521291wjc.135.1424081626618; Mon, 16 Feb 2015 02:13:46 -0800 (PST) Received: by 10.194.192.202 with HTTP; Mon, 16 Feb 2015 02:13:46 -0800 (PST) X-Originating-IP: [93.129.131.180] In-Reply-To: References: Date: Mon, 16 Feb 2015 11:13:46 +0100 Message-ID: To: Joe Watkins Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7bd6adce7c7101050f31d703 Subject: Re: [PHP-DEV] RFC: Expectations From: kontakt@beberlei.de (Benjamin Eberlei) --047d7bd6adce7c7101050f31d703 Content-Type: text/plain; charset=UTF-8 On Mon, Feb 16, 2015 at 10:37 AM, Joe Watkins wrote: > Morning internals, > > I've had mostly negative feedback on the design-by-contract idea, maybe > it's a step too far. > > The expectations RFC in its current form proposes that we introduce > zero-cost assertions, which are compatible with the current assertion API. > > Since this has been in discussion for quite some time, Dmitry and I > propose that the patch is rewritten for PHP7 and we get to voting as > quickly as we are able. > > Please review the RFC, and provide feedback, if there are no strong > objections we will go ahead with a vote when the patch is ready, in the > coming days. > Could you improve the PHP.INI section and explain in detail what the two new settings do? i think its somewhere implicitly described in the RFC but there is never an explicit description. This section should probably be it. If this ini setting affects opcode generation, have you thought about invalidation when changing the setting? Do I understand correctly that this is a rebuilt of the already existing assert() functionality? What about the old behavior? You mention its compatible, but assert() api had a switch to decide over Exceptions vs warnings vs quietly skip. i think the RFC should focus more on this being an improvement of assert. It sounds like a completly new feature. For example: 1. you are changing assert to be an opcode instead of a normal function 2. adding the new Exception mode and that it formalizes what you could do before by using the callback mode: assert_options(ASSERT_CALLBACK, function () { throw new AssertionException(); }); Otherwise i am +1 on this. It fixes some annoying features of the assertion API. > > https://wiki.php.net/rfc/expectations > > Cheers > Joe > --047d7bd6adce7c7101050f31d703--