[Date Prev][Date Next][Thread Prev][Thread Next]
- From: David Given <dg@...>
- Date: Tue, 09 May 2006 01:26:00 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Javier Guerra wrote:
> that hits the nail!
> in fact, since the first question, i've been trying to put into words how much
> (even after doing some dabbling in Perl).
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
It occurs to me that there might be a niche for a strongly typed language that
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
| firstname.lastname@example.org | than you are, do something insane and let him think
| (email@example.com) | himself to death." --- Pyanfar Chanur
+- www.cowlark.com --+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v126.96.36.199 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----