lua-users home
lua-l archive

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



On Sep 20, 2006, at 9:42 AM, Sam Roberts wrote:

On Wed, Sep 20, 2006 at 09:23:42AM -0700, Chris Marrin wrote:
A good point and one we all know well. But the sad fact remains that  
Lua's oddball syntax is what keeps it from having better penetration  
into corporate culture. This is perhaps only sad to me, because I want  

Do you really think people around you would have been OK with lua if
there had been little adjustments to its syntax? That surprises me, I'd
think there would be more to that in language choice. And if they are
trying use _javascript_ for everything, its a bit hard to blame them!

Btw, I don't know any _javascript_, I worked in C++, now mostly C, with
day-to-day scripting in sh, then perl, and now pretty much
exclusively ruby.

Other than lua doesn't have the C boolean operators (&&, ||, !), which I
keep forgetting, and the fact you have to do function calls with a ()
unless the argument is a string (which I keep forgetting), there isn't
anything particularly odd about its syntax I can see. Maybe it is I
who will find _javascript_ weird if I ever learn it. Didn't know it was
a 600lb gorilla. Last I heard, it was the cockroach in the cracks of web
pages called when people pushed buttons on webapps. I must be out of
touch :-)


Given that there are millions of web pages in existance and _javascript_ is used on a large percentage of them (certainly much larger than ANY other language :-) I would have to call it a 600lb gorilla, if you're talking about scripting languages. And if Lua syntax were "_javascript_ compatible" that would go a long way toward making an argument for it. As it is, using 'and' rather than '&&', '~=' rather than '!=' and '--' rather than '//' are just showstoppers.

Sure, you could change the syntax, and in fact I was working on a translator from a subset of _javascript_ syntax to Lua syntax. But then it is neither Lua nor Javascipt. And then you have to start thinking that maybe you should just use your own _javascript_ interpreter and work at optimizing it in various ways. Which is what I am doing now. 

I REALLY like many things about Lua, mostly its small size and modest goals. I really respect its designers for keeping its scope small. I even respect them for holding fast to their syntax. But it's just a showstopper for a company like Apple and I'm sure we're not the only ones.

-----
~Chris                       And now, an important message from Microsoft:
chris@marrin.com  "Dear aunt, let's set so double the killer delete select all"