3 ms·
I agree with the author that while PHP is aesthetically ugly, it works well in its niche and already has so much momentum there's basically no point to doing a
by compay 18y ago
I agree with the author that while PHP is aesthetically ugly, it works well in its niche and already has so much momentum there's basically no point to doing a rewrite.
I also think a rewrite is poinless because in many ways Lua is already a better PHP. It's easy to learn, blazing fast, small and portable. You can easily embed it in web pages with <? or <% tags just like PHP and other scripting languages.
As far as I know the only thing missing is an Apache module of the quality of mod_php. There is a mod_lua, though it appears to have been neglected for a while.
So rather than a rewrite of PHP, I'd rather see someone put the time into getting Lua up to snuff for solid web development, because it's already pretty close.
- danw 18y agoHave you used Lua for building web apps? I'm thinking of giving it a try.
- compay 18y agoI've been looking into it for a couple weeks and am about to do some "hello world" apps this week. There's some interesting stuff in the Kepler project but the available libraries are definitely pretty low compared to a lot of other languages.
- jrockway 18y agoThe good news is that at least Lua has the core language features you need to implement good libraries and extensions. It also has very nice syntax for a non-Lisp. If Lua became the new "standard" for web development, I wouldn't complain at all. I probably wouldn't use it, but if I had to, it wouldn't be bad :) (I was recently forced to do some PHP and Java projects. Wow. Never again.)
- danw 18y agoLua seems like a cross between javascript and python in terms of style. Has anyone built a server side javascript app? Or have access to Rhino on Rails?
- LogicHoleFlaw 18y agoSimilar in terms of style, maybe, but conceptually Lua is extremely close to Scheme. It's an extremely intentional resemblance. The language core is very clean, concise, and consistent.
- davidw 18y agoSome sort of Lua module went into the Apache core svn tree, and is being actively worked on: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/README?revision=737290&view=markup http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/R... But I don't think that will cut it in terms of making PHP go away. There has always been competition for PHP, but it's pretty popular right now, and it will be hard to displace...