Re: [RFC] Strict type hints (parameter and return value)

From: Date: Thu, 17 Apr 2008 18:07:25 +0000
Subject: Re: [RFC] Strict type hints (parameter and return value)
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-37104@lists.php.net to get a copy of this message
Hi Stanislav, On Thu, Apr 17, 2008 at 7:59 PM, Stanislav Malyshev <stas@zend.com> wrote: > As a final shock, I am not convinced > functions in PHP should throw exceptions when parameters don't match - and > even if they do, first they should attempt to make sense of parameters > (which makes string hints like "integer" and "string" make no sense - you > can convert a lot of things to int or string). This is of course why I suggested that the best approach would be automatically convert them, rather than reject a type which can be coerced appropriately. I would settle for the current proposal, but if you're going to make the language weakly-typed, which it is, it is more appropriate to keep this in line with the rest of the language. Paul -- Paul Biggar paul.biggar@gmail.com

« previous php.internals (#37104) next »