News Feed
Jobs Feed
Sections




News Archive
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

blog comments powered by Disqus

Similar Posts

Scott Mattocks' Blog: PHP-GTK 2 Alpha Released

ProDevTips.com: Parsing tags with Zend Feed

SitePoint PHP Blog: How strict is your dynamic language?

Brandon Savage: "Do This, Not That" Now Available!

Liip Blog: Of HHVM, Hack and the future of PHP


Community Events











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


introduction podcast hack facebook component database language threedevsandamaybe composer unittest package release symfony2 code performance framework application install security hhvm

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