Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95080 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27819 invoked from network); 12 Aug 2016 10:12:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2016 10:12:05 -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:54266] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/0C-56950-2F0ADA75 for ; Fri, 12 Aug 2016 06:12:04 -0400 Received: (qmail 95924 invoked by uid 89); 12 Aug 2016 10:11:58 -0000 Received: from unknown (HELO mail-qt0-f178.google.com) (yohgaki@ohgaki.net@209.85.216.178) by 0 with ESMTPA; 12 Aug 2016 10:11:58 -0000 Received: by mail-qt0-f178.google.com with SMTP id w38so10302786qtb.0 for ; Fri, 12 Aug 2016 03:11:57 -0700 (PDT) X-Gm-Message-State: AEkoout9ZkMmWo9/qrpiYSBJZy6xA3wSKDy3x+sDrlAnRvtQOaBe6V33VusXOpccecM46NZ9XWE8TghtZ28G3g== X-Received: by 10.237.49.130 with SMTP id 2mr16848181qth.38.1470996712006; Fri, 12 Aug 2016 03:11:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.85.242 with HTTP; Fri, 12 Aug 2016 03:11:11 -0700 (PDT) In-Reply-To: References: <10fbcb03-5de8-4d9a-da1c-7e2bf77937cb@lsces.co.uk> <5657afc7-7569-5fc4-4a5a-27ed786c4fa5@gmail.com> <0825c173-5cb4-7f65-cf34-b45ca30919a3@lsces.co.uk> <8646c3ad-b929-cb0b-bad4-52a0a7160d16@gmail.com> <11ce571b-964b-5a3e-9f2f-3f69a8bc20b4@lsces.co.uk> <7d9db8d5-ae7a-4123-14f4-f76fb6d764c5@gmail.com> Date: Fri, 12 Aug 2016 19:11:11 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Lester Caine Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Simple variable handling. From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Lester, On Fri, Aug 12, 2016 at 5:19 PM, Lester Caine wrote: > I'm thinking > $var->setConstraint() > $var->setEscape() > $var->setReadOnly() DbC cannot cover all, but some of them can be covered during development. https://wiki.php.net/rfc/introduce_design_by_contract https://wiki.php.net/rfc/dbc https://wiki.php.net/rfc/dbc2 Runtime constraint is good, but it could be too slow. Proper DbC would have nice balance on production and development checks. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net