Re: Type hinting
| From: | Lukas Kahwe Smith | Date: | Sun, 23 May 2010 12:51:30 +0000 |
| Subject: | Re: Type hinting | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-48410@lists.php.net to get a copy of this message | ||
On 23.05.2010, at 14:44, Sebastian Bergmann wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/23/2010 01:08 AM, Ilia Alshanetsky wrote:
>> any mistmatch results in an error
>
> An error that is recoverable. So not only is the "strict typing"
> optional, but "type mismatches" can be caught and handled.
again .. are you saying that a recoverable error is more than a way to display a nice error message
instead of a white screen?
anyway, the fundamental question at hand is where the "burden" of correct typing should be
placed, on the API consumer or on the API provider. this also ties in with the question if API
consumers are likely to have "properly" typed (aka typed in the way the _various_ API he
consumes expect) by default or not. i think this is the key question to answer when deciding to go
with enabling type hinting or full out strict typing.
regards,
Lukas Kahwe Smith
mls@pooteeweet.org