Re: Design by Contract

From: Date: Tue, 10 Feb 2015 17:59:19 +0000
Subject: Re: Design by Contract
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi Yasuo,

Le Tue, 10 Feb 2015 07:25:00 +0100, Yasuo Ohgaki <[email protected]> a écrit:
Updated wiki page. https://wiki.php.net/rfc/dbc2
While I agree this RFC is going in the right direction, I don't like the use of "require" and "return". They are already used for something completely different, I think it will make the code more difficult to understand (for beginners) and parse (for external programs). IDE will have some difficulties too. I've discussed about it with some PHP developers who work with me, and they all agree. If it was me, I would use "pre" and "post", "in" and "out" or "requires" and "ensures". I understand that creating more keywords isn't something pleasant, but it would make the code more readable and logical. Regards, Benoit.

Thread (220 messages)

« previous php.internals (#82390) next »