[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Porting a Javascript program
- From: Eike Decker <zet23t@...>
- Date: Mon, 23 Feb 2009 18:13:23 +0100
> Lua and Javascript are more similar to each other than they are to any
> other languages, despite their differences. Their similarities are:
> lexical closures, fairly conventional syntax, dynamic typing,
> prototype-based objects, designed for embedding in larger apps.
Yes ... and yet it's ending up in a wicked syntax that is only
distantly reminding me of Lua...
var foo = function (value) { return function() { return value; } }(somevalue);
instead of
local value = somevalue
foo = function () return value end
Eike