On 03.06.2010, at 18:57, Ferenc Kovacs wrote:

> 
> 
> On Thu, Jun 3, 2010 at 6:32 PM, Lukas Kahwe Smith <m...@pooteeweet.org> wrote:
> 
> 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
> 
> 
> 
> 
> Sorry, I missed the point when Josh was suggesting to turn PHP into a 
> strictly typed language.
> I think that you should have noted, that what suggestion/idea are you against 
> it.
> Converting the variable type to the appropriate one?
> Or the strict type hinting?
> 
> Tyrael
> 
> ps: 
> http://en.wikipedia.org/wiki/Straw_man
> 
> Straw man arguments often arise in public debates such as a (hypothetical) 
> prohibition debate:
> Person A: We should liberalise the laws on beer.
> Person B: No, any society with unrestricted access to intoxicants loses its 
> work ethic and goes only for immediate gratification.
> The proposal was to relax laws on beer. Person B has exaggerated this to a 
> position harder to defend, i.e., "unrestricted access to intoxicants".[1]

You didnt read my email: I was saying that focusing PHP API's on consuming and 
returning strict types _would_ make sense if the language would be strictly 
typed. I did not suggest that Josh was implying that, which is part of why I 
have an issue with his post.

Or in other words I was saying he isnt going _far_ enough, though if he did go 
far enough to make things worthwhile, then this is not the right place, because 
PHP is not the right basis.

Or in yet other words, I think a strict typed dynamic web oriented programming 
language has merit, just that PHP is not the right language to start from if 
that is what you want to design.

I could probably find some wikipedia article to reference in order to 
misrepresent your reply, but I will hold off on that.

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