Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96908 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98066 invoked from network); 16 Nov 2016 08:28:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Nov 2016 08:28:04 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:54158] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/6A-05303-F881C285 for ; Wed, 16 Nov 2016 03:28:01 -0500 Received: (qmail 5385 invoked by uid 89); 16 Nov 2016 08:27:56 -0000 Received: from unknown (HELO mail-wm0-f48.google.com) (yohgaki@ohgaki.net@74.125.82.48) by 0 with ESMTPA; 16 Nov 2016 08:27:56 -0000 Received: by mail-wm0-f48.google.com with SMTP id a197so222998439wmd.0 for ; Wed, 16 Nov 2016 00:27:55 -0800 (PST) X-Gm-Message-State: ABUngvdZgpODq/7q5io3TZXMRk5x1wQH9h4tpo32bYqq9/OyRPwsv+ZbdvlKKZCmthcJUsecl5Po2fGAnE7EUw== X-Received: by 10.194.24.34 with SMTP id r2mr994527wjf.111.1479284868765; Wed, 16 Nov 2016 00:27:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.190.200 with HTTP; Wed, 16 Nov 2016 00:27:08 -0800 (PST) In-Reply-To: References: Date: Wed, 16 Nov 2016 17:27:08 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Guy Marriott Cc: Michael Morris , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Type locked variables From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Michael, On Wed, Nov 16, 2016 at 9:06 AM, Guy Marriott wrote: > I think it would make more sense for typed properties to exist first, and > it so happens that there was a recent RFC for this: > https://wiki.php.net/rfc/typed-properties. That RFC failed by a very small > margin. > > I would suggest you read through the discussions on the mailing list > regarding that RFC for some common arguments to typing in PHP. In addition, type safety provides limited safety. e.g. Range checks are mandatory for safety. DbC provides more powerful features to ensure proper operations without production environment overheads. https://wiki.php.net/rfc/introduce_design_by_contract https://wiki.php.net/rfc/dbc https://wiki.php.net/rfc/dbc2 In order to exploit power of DbC, we need usable/easy to use validation feature like https://wiki.php.net/rfc/add_validate_functions_to_filter though. i.e. Most DbC checks are omitted in production environment, therefore validation function that is executed in production environment is mandatory with DbC. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net