>> I'm continually struck by the resemblence between the two languages. Is
>> there a relationship?
> No, as far as we know.
> its "object model" in place.)
> -- Roberto
On Monday 08 May 2006 2:12 pm, Bret Victor wrote:
> <whisper <at> oz.net> writes:
> > I'm continually struck by the resemblence between the two languages. Is
> > there a relationship?
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).
after realizing how much of the language theory is shared with Lua, i find
that i can actually write some short JS stubs... but the pain is still there.
why? i still don't know.
i put most of the blame in the pseudo-java syntax (which is a pseudo-C syntax
itself). note that, after Lua, the language i like best is C...
so, i think that C syntax is right for low level languages, where you have to
keep track of pointers, and do your references right; and for scripting
languages, where everything is how it should be (instead of how it's easier
for the machine to execute), the syntax have to be different, with much more
thought into aesthetics.
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
| [hidden email] | than you are, do something insane and let him think
| ([hidden email]) | 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