On Wed, Jun 26, 2013 at 6:02 PM, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> Hi!
>
>> Currently PHP doesn't support what could be a good feature for code
>> quality, return typing (or if you prefer to call it: return type
>> hinting).
>
> What changed since the last time we discussed this?
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227

Hi,


Well I don't want to sound disrespectful, but to be honest, nothing
really. Just the year and the fact that I don't want to allow for
double return types, like object or null or false, like in the other
proposal, if you would read the gist. While I would like to have full
type hinting available, including scalars as well, I think we could
greatly benefit from it even without them.

Like I've said, it's about code quality, something that PHP
programmers lack today badly because PHP is so flexible (don't even
try to argue with that).

As for the argument of don't design features that are optional, like
you've said in the past discussion, here's a optional feature that
everyone uses it today: argument type hinting. Is it optional, yes?
Could we live without it? Yes. Would everyone be sane without it? Not
sure.

PHP is too flexible for its own good. The fact that we have good use
cases for such a feature, just look at the thread so far, makes is
useful to consider. And I don't understand why having return typing
would be such a bad thing when we already have argument typing, which
is a half baked feature (even worst, no?) as it doesn't allow for
scalar hinting. And just having this half baked feature in the
language makes is very unattractive for some people and reduces the
code quality, but for others it's extremely useful, do you want to
argue that we don't need this because .... ?


Best regards
----
Florin Patan
https://github.com/dlsniper
http://www.linkedin.com/in/florinpatan

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to