lua-users home
lua-l archive

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



Alexander Gladysh kirjoitti 24.3.2008 kello 13:42:
On Mon, Mar 24, 2008 at 12:38 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
Yes, it isn't that difficult to make Lua look like another language,
but the difficulty comes when people expect the same semantics ;)
Easy to 'skin' Lua to look like JavaScript, but boy, it will bite
people who are expecting the same forgiving number-string
autoconversions.

It is IMHO a good idea that scripting languages keep distinct syntax
so that users know that this is a different animal.

Very good idea indeed. I personally always stumble things like on !=
vs ~= and on if (...) vs if ...then differences. But that stumble
allows my mind to do a context switch and to start thinking in Lua
after coding in C++ and vice versa. Such context switch allows both
(quite different!) programming paradigms to coexist in my mind.

If both languages would look identically, I guess, I'd be very
frustated trying to wrap my head around paradigm differences.

Alexander.

You're right. One language I've never found myself liking, maybe exactly for this reason, is Objective-C. I can read it, even write it, but since the context changes happen line wise within the source code, it's too double minded. At least to me.

To those not familiar with Objective-C, it tries to marry C and Smalltalk within the same source files. One has strict types; the other dynamic. Like embedding your Lua code within C sources, line by line.

-asko