Re: Type hinting

From: Date: Sat, 29 May 2010 17:17:53 +0000
Subject: Re: Type hinting
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-48568@lists.php.net to get a copy of this message
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

« previous php.internals (#48568) next »