News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Igor Wiedler:
Evolving syntax
July 31, 2013 @ 11:44:07

In a new post to his site Igor Wiedler looks forward and suggests some alternate syntax for PHP based around the idea of macros from Lisp. These macros would be parsed at runtime and handled directly as code, compiled down from their custom format.

A very common problem that many software projects have is lack of adoption of new versions. Browsers are an excellent example of this, But it exists on the server as well. [...] This leads to this recursive problem of hosting companies not upgrading because they don't have to, and software not requiring newer versions of their programming language, because they don't want to lose their users. The longer your dependency chain is, the more you suffer from this.

He points out that the easier it is to update these lower level pieces, the simpler it is to introduce new things into your system. He suggest that macro-like functionality for PHP could aid in this goal. He talks some about backporting features and how these marcos could make it easier to upgrade just the things we wanted (or all of them) without having to upgrade PHP itself. He even went so far as to create a tool (galapagos) that does this kind of parsing. His examples implement the 5.4 features of short arrays, $this in closures, function array dereferencing and callable typehinting.

Being able to invent your own syntax is very useful, which instantly becomes apparent when you look at the past. Features get added to languages all the time. What if you could do that easily, within minutes instead of months?
0 comments voice your opinion now!
evolve syntax lisp macro feature galapagos parse ast language

Link: https://igor.io/2013/07/26/evolving-syntax.html

William Candillon's Blog:
The Parse Tree generator
October 11, 2006 @ 10:49:00

William Candillon has made a quick post concerning his phpAspect project including a demo for anyone to work with and some documentation for the project.

I put this form online so you can try the parse tree extension without installing it: http://phpaspect.org/ast. You can upload your own php script and get the xml tree or the tree visualization in png format.

I also put a mini documentation on a wiki page: http://phpaspect.org/wiki/doku.php?id=parse_tree.

Check out the main project website for all of the info surrounding the phpAspect project and where it's headed.

0 comments voice your opinion now!
parse tree generator phpaspect ast demo wiki documentation parse tree generator phpaspect ast demo wiki documentation



Community Events





Don't see your event here?
Let us know!


api zendserver tips list package symfony deployment introduction series language update install community release laravel interview library podcast framework opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework