3 ms·
I think this is a good idea. PHP solves a niche of small sites with slightly dynamic templates. (To some extent it owes more to rebol than to php - it has a la
by tef____ 15y ago
I think this is a good idea. PHP solves a niche of small sites with slightly dynamic templates.
(To some extent it owes more to rebol than to php - it has a large grammar and a notable amount of literals.)
It makes first class what other languages embed in strings - sql, urls, html, etc. In doing so it can solve a large class of security problems that plague many php projects - you don't need to worry about sql injection when the language handles the query parsing.
PHP was successful for a number of reasons, one of which was that it was embedded and exposed a number of cgi specific features into the language ($GET, $POST, etc), this continues in this vein to embrace urls, sql and html as part of the language. The programmer no longer has to deal with escaping or transforming or sanitising strings. This is cool.
Given it runs on the jvm - it should be possible to layer this atop of heroku or google app engine without worrying too much either.
This approach isn't new either - philip wadler tried in a similar way with the functional language 'links'.
(disclaimer: I think php is a terrible, terrible implementation of some good ideas - the library, language and implementation are notable examples of bad ideas in programming)
- j_col 15y ago> PHP solves a niche of small sites with slightly dynamic templates. Like Facebook. And Flickr. And StumbleUpon. And... Wait a minute, are we not past this "PHP only works a small sites" thing yet?
- tef____ 15y agoit turns out a tempting language can be useful for more than one thing, but for small sites, it works very well. you are reading between the lines to find an argument that isn't there.