Re: Design by Contract

From: Date: Sat, 14 Feb 2015 23:33:58 +0000
Subject: Re: Design by Contract
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-82709@lists.php.net to get a copy of this message
Hi all, On Sun, Feb 15, 2015 at 8:25 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> 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

« previous php.internals (#82709) next »