[Date Prev][Date Next][Thread Prev][Thread Next]
- From: agentzh <agentzh@...>
- Date: Mon, 21 Nov 2011 13:48:24 +0800
On Fri, Nov 18, 2011 at 11:14 PM, Axel Kittenberger <firstname.lastname@example.org> wrote:
> JS to Lua is just as tricky. As similar the languages have evolved
> (convergent evolution) they are different enough that they cannot be
> easily translated in each other, at least not without a large
> compatibility/emulation layer.
I don't think it'll trickier than translating Perl 5 to Perl 6 ;)
> In Lua 5.1 I would have said,
> impossible since continue not supported by Lua, with 5.2 they got a
> workaround at least. Its still tricky tough.
Why should we do a strict literal translation here? The assembly
language does not support "continue" but it does not prevent a C
compiler to translate C code to it ;)
> How do you properly
> emulate JS undefined/null destinction?
Userdata, for example? ;)
> On Arrays with holes one can
> construct cases where JS even distinguishes "not there", "undefined"
> and "null" :-)
compiler implementation :)
test suites out there ;)