lua-users home
lua-l archive

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Javier Guerra wrote:
[...]
>> Lua is Javascript done right.  Javascript is Scheme done wrong.  :)
> 
> that hits the nail!
> 
> in fact, since the first question, i've been trying to put into words how much 
> i find javascript horrendous, easily the language i find most hard to swallow 
> (even after doing some dabbling in Perl).

Search the list for my earlier rant on Javascript's Array class...

I found something else about Javascript I loathe: when you call something, the
value of 'this' in the called thing depends on how you call it.

new Fnord() --- calls function Fnord() with this set to a new object.
wibble.fnord() --- calls function Fnord() with this set to wibble.
fnord() --- calls function fnord() with this set to whatever it was before (I
think, I could be wrong about that).

...which can lead to all *kinds* of obscure bugs! Lua's behaviour where self
is passed around explicitly is so much nicer... it's interesting that two
languages that are so similar are so different to program in; I'm not entirely
sure why.

...

It occurs to me that there might be a niche for a strongly typed language that
compiles *into* Lua or Javascript code (easy enough to support both). I doubt
you'd be able to easily support either language's level of dynamicism, but for
writing big, standalone apps I'd certainly find it useful. Hmm --- I must
think about that...

- --
+- David Given --McQ-+ "If you're up against someone more intelligent
|  dg@cowlark.com    | than you are, do something insane and let him think
| (dg@tao-group.com) | himself to death." --- Pyanfar Chanur
+- www.cowlark.com --+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEX8dff9E0noFvlzgRAkSgAKCUUwVqqhH2HU8wVFCoCRxBvlCOAQCgy0VY
c01lDBRMBPGONG3t9vFxOWk=
=zJ3x
-----END PGP SIGNATURE-----