Re: type hinting

From: Date: Sat, 05 Jan 2008 21:16:02 +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-34511@lists.php.net to get a copy of this message
Stefan Esser wrote:
Be conservative in what you do; be liberal in what you accept from others.
You hopefully realise that this is exactly the opposite of your earlier opinion that ext/filter should be used to block everything and let only harmless data through. And only have raw data on demand...
Not at all. Filtering is about the contents of the data, not the scalar type. It is only the most trivial of filtering that is solved by typing. It is the value of the number or the contents of the string that will trip you up, not whether it is a string or a number.
I really don't understand why adding a *new feature* to the language (that you can use or just not use and) that helps writing better code and helps potential optimizers (that will come up as soon the feature is implemented) to highly optimize the code get so much resistance...
I'm not against it, but if it is implemented, it needs to make sense. -Rasmus

« previous php.internals (#34511) next »