Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82709 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80492 invoked from network); 14 Feb 2015 23:34:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2015 23:34:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.172 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.216.172 mail-qc0-f172.google.com Received: from [209.85.216.172] ([209.85.216.172:57119] helo=mail-qc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/72-00421-29BDFD45 for ; Sat, 14 Feb 2015 18:34:42 -0500 Received: by mail-qc0-f172.google.com with SMTP id i8so5723821qcq.3 for ; Sat, 14 Feb 2015 15:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=QFgjaEisp4pYEYD7ulrUO1Y57ezQlYLWxGhiELpDnmE=; b=NQ1ckUkwe4mk499ZVPVY4ZZW6ypcIaid7BNd0U17tUQvA9J6Tgs/TOZAqfdWCShf8i R6XpyLwlYvjIIKEj2sBkjICHag5pcQzERcUL8x7+Sw85jOlukMWOodJxAQaF/KrX9+gR UWF8pIIx7kFwlhD8oFitfmiRkmDtkOkcTZLLFsex7UJQ496QR2b/NtNHkuBg9Nv6cJpd 7cF6mzamBf8qRu7SUT2ZnFqqmlJEEakZlKv+1yiFFIcxIe2sznKAVsUq1tsedoeL+aOL RR2p2L54mgpEkR9noIK96XMKFLCqPiRIDwkBPmcFnwTtYyIrgSMF0JWPe47MQv8/MOBl uPtg== X-Received: by 10.140.235.197 with SMTP id g188mr4413241qhc.86.1423956879635; Sat, 14 Feb 2015 15:34:39 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Sat, 14 Feb 2015 15:33:58 -0800 (PST) In-Reply-To: References: <54DAFD32.3000005@gmail.com> <54DB0BC0.20304@gmail.com> <54DBA801.8060403@gmail.com> <013801d0481d$d34c5170$79e4f450$@php.net> <002701d04846$50c0d630$f2428290$@tutteli.ch> <006f01d048ab$f98ded60$eca9c820$@tutteli.ch> Date: Sun, 15 Feb 2015 08:33:58 +0900 X-Google-Sender-Auth: 3SW9ze-BPKsMk8Ty1g8DN4aGtYg Message-ID: To: Robert Stoll Cc: francois , Dmitry Stogov , Joe Watkins , Stanislav Malyshev , PHP Internals Content-Type: multipart/alternative; boundary=001a11357acefc7a28050f14cbdd Subject: Re: [PHP-DEV] Design by Contract From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11357acefc7a28050f14cbdd Content-Type: text/plain; charset=UTF-8 Hi all, On Sun, Feb 15, 2015 at 8:25 AM, Yasuo Ohgaki wrote: > Both D and Eiffel has way to get around it. > As I mentioned in previous mails, PHP may be get around with it by default > because it's the nature of PHP. PHP may be extended to follow type theory > in the future when strict_types is enabled. > To have strong types, PHP programs would be "compiled" programs since type safety should be resolved at compile time. Current PHP even allows to replace base class at runtime. e.g. if ($some_flag) { require('A.php'); // Load A class for this } else { require('A.php'); // Load different A class for this } This kind of code cannot exist in strongly type world. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11357acefc7a28050f14cbdd--