lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Mar 15, 2011 at 5:13 PM, HyperHacker <hyperhacker@gmail.com> wrote:
> Recently there was some discussion about mod_lua on the Apache
> developers mailing list. I mentioned there that I feel Lua could
> replace PHP as the number one web scripting language if mod_lua
> were stable (i.e. not still in beta) and it were implemented well (not
> making some of PHP's mistakes such as putting everything in the
> global scope with no consistent naming or parameter schemes). I've
> wanted to use Lua for all the things I currently use PHP for ever
> since I discovered it.

What makes PHP powerful and popular isn't the language but the rich
library of functions that nearly every installation of PHP has.  In
fact, with some effort one could come up with a worse language than
PHP with even weirder semantics, add random syntax to make it suck
more, and require that all keywords be in Klingon transliterated into
Chinese.  And despite all that, developers would still *love* it
because 85% of what they want to do is handled by the library.  And
they know that when deploying their application, those functions are
going to be there.

I'm an embedded systems guy, but occasionally I have to do some web
work.  And although I grit my teeth every time I have to deal with
PHP's assorted insanities, I still use it because most of the time I
can find functions to do pretty much anything I need.  From a language
perspective, I'd much prefer to use Lua or Forth or Scheme.  But with
each of those languages, I'm not spending my time writing the
application.  I'm spending it either searching for a binding to a
library or writing the code myself from scratch.  Which is a very good
thing in the embedded systems world where I need total control over
everything.  But in the web world, I don't want that.  There I'm
flying high above the hardware and want all those high-level
abstractions and handy functions that are provided.