Stas Malyshev <smalys...@sugarcrm.com> wrote:

>Hi!
>
>> Well, apart from perhaps leaving them with a simpler language that 
>> doesn't have the inconsistencies and corner cases that currently
>exist 
>> (and documented ad nauseum) not because of any design decision but 
>> "because the parser is written that way".
>
>If you think writing new parser gets rid of all corner cases you are in
>for a big surprise. AST is not magic and parser will always be written
>exactly the way it is written - so if somebody won't implement certain
>feature in a consistent way, it won't be implemented in consistent way,
>AST or not.
An AST allows much deeper analysis of the syntax used after parsing (i.e. 
parsing of tokens to AST), though. This means you can be greatly more flexible 
with regards to a lot of things, and greatly reduce magic corner cases, such as 
executing a closure from a dereferenced array which is a static member of a 
class (something there is no good reason you can't do, just limitations of 
current parser)
>And it's a bit late to take design decisions on existing PHP language,
>it seems to me.
What?
>-- 
>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

-- 
Sent from my Android phone with K-9 Mail.
Andrew Faulds
http://ajf.me/

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

Reply via email to