Strongly second this. PHP is not a toy language restricted to beginners. If it has advanced features, beginners simply don't need to use them.

If anything, I would argue that PHP is a language unsuited to beginners (and other scripting languages), as it is so flexible it doesn't enforce good programming practice. Java is much more a 'beginner language' because it has much stricter syntax, type checking, exception handling, etc., which force and even teach people to program well in some regards (or at least do something to raise their awareness that they're programming sloppily!). Mind you, it's pretty easy to write bad code in any language....

Ben.



On 19/01/11 9:36 AM, Hannes Landeholm wrote:
Hello,

I don't think a language becomes a "beginners language" just because many
new programmers use it. And it's still not a good argument for not including
new features.

As long as the new thread doesn't share any memory/variables with the
spawning context, no "reasoning" is required at all. It's when you start
sharing objects that things get complex. Just a simple threading
implementation with a strictly defined way to IPC would be very helpful.
It's not super useful in web application programming as handling web
requests is already packaged into small units of work.. web requests. So in
that sense a web application is already "multi threaded". However it's
interesting for CGI scripts. The other week I wrote a PHP CGI proxy for
example. Because PHP didn't have threading, I had to bother with select
polling.

Hannes

On 18 January 2011 23:10, Stas Malyshev<smalys...@sugarcrm.com>  wrote:

Hi!


  Sorry, but that's my topic, and the most well know interpreters that
'pulled off' threading with shared data are for Java. The interpreter


Given to what complications Java programmers should go to make their
threaded code work, I have a lot of doubt that 95% of PHP users would be
able to write correct threaded programs. Reasoning about threaded programs
is very hard, and IMHO putting it into the beginners language would be a
mistake.

--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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




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

Reply via email to