My biggest issue as a user is the fatal errors. Why are we blowing up on
something that should throw some kind of useful argument exception? I end up
in my applications using instanceof everywhere because their is important
cleanup to be done before the end of the request. For example I can't afford
for php to just blow up in our account setup script, we are reaching out to
multiple non-transactional external resources. Some of our long running
command line processes have the same issue. I am all for type hinting but
the fatal errors or "catchabale" fatal errors are just silly. Exceptions
make so much more sense to me.

-Chris

On May 29, 2010 10:19 AM, "Zeev Suraski" <z...@zend.com> wrote:

At 11:33 29/05/2010, Sebastian Bergmann wrote:

>  The "optional scalar type hinting"  [snip]
>

Sebastian,

I understand why proponents of strict typing are putting 'optional' next to
it to suggest that people don't have to use it, ergo those who don't intend
to use it shouldn't care.  As numerous people (myself included) explained,
any feature we add to the language ends up being necessary for users to
understand - far beyond those who may have wanted to intentionally use it in
the first place.

Of course it's optional.  Using for loops is also optional - nobody forces
you to use them.  Even functions are optional.  Objects?  Completely
optional.

Why ont add some optional Ruby syntax support, along with optional Perl
syntax support?  Optional malloc() & free() functions?  Optional pointer
arithmetic? Those who don't want to use it wouldn't have to.

Let's not fool ourselves by saying an optional feature doesn't bring clutter
to the language.  It does.  Auto-converting type hints included - but unlike
strict type checking - the value they bring is arguably higher than the
clutter & complexity associated with them.

Zeev




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

Reply via email to