On 03.06.2010, at 18:25, Josh Davis wrote:

> On 1 June 2010 20:43, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> 
>> It is very frequent that you want number and get "1" instead - almost
>> all incoming data for PHP are strings.
> 
> I'd like to point out that filter_input() does cast user input to the
> right PHP type. And if memory serves, ext/filter is meant to be PHP's
> standard way of handling user input. So in terms of incoming data, I'd
> consider user input being covered already.
> 
> The only other big source of data is the database. Unfortunately, it
> seems that mysqlnd experiments in using MySQL's binary protocol for
> all queries and not just prepared statements [1] didn't materialize.
> But again, the same way filter was one of PHP 5.2's highlights,
> mysqlnd is one of PHP 5.3's highlights and the recommended way to
> communicate with MySQL, which means that if mysqlnd gained that
> ability somewhere down the road then most of incoming data would be
> correctly typed already. Emphasis on "would."


Thats all fine and dandy if the ultimate goal is to turn PHP into a strictly 
typed language and of course if 90% of the API's you talk to require strict 
typing, then the question becomes why even use a dynamic language to begin 
with? Why not clean all of that "magic" out, get better memory management, less 
overhead in plenty of places, less chances for typos to result in hard to debug 
issues. Sure sounds good and I guess there probably is a market, maybe even an 
urgent need for a strictly typed scripting language for the web space.

But really is PHP the best basis for this?

regards,
Lukas Kahwe Smith
m...@pooteeweet.org




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

Reply via email to