[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua
- From: Alessandro Delgado <adelgado1313@...>
- Date: Thu, 1 Dec 2011 16:12:00 -0200
On Thu, Dec 1, 2011 at 4:01 PM, Javier Guerra Giraldez
<javier@guerrag.com> wrote:
> On Thu, Dec 1, 2011 at 12:03 PM, Fabien <fleutot+lua@gmail.com> wrote:
>> Coroutines. Look at any non-trivial node.js program, it's an awful mess of
>> nested callbacks; very hard to read, impossible to maintain. Coroutines fix
>> that, and that's a killer feature by itself.
>
> this.
>
> callbacks-driven pseudomultitasking isn't anything new; it was the
> only way to get good responsiveness in classic MacOS. it was used only
> for slow I/O for a reason: it's _ugly_
>
> current node.js proponents say that it's not so bad, or that you only
> have to shift your reasoning process. still, there are lots of people
> (and growing) that find it unmaintable for anything non-trivial.
>
> coroutines do fix that; up to a point. as the Copas (and Xavante)
> experience teach us, you have to be careful not to stall too long
> without I/O (to give a chance to the scheduler to yield). besides
> that, it's just as if you had multiprocessing without the overhead.
I've been doing some light node.js development and I'm about to start
a larger project. Since JavaScript was 'rediscovered' , I keep noting
that many features that people enjoy about it have been in Lua for
years too, and I'd rather write Lua than JavaScript (mostly for
religious reasons, performance is far from limiting me on the simple
tasks I have). I'll checkout Luvit as soon as possible, I've been
dreaming about something like it for months now.
Javier and Fabien, could you elaborate or send references as to why or
how callback-oriented architectures seem to lend themslves to becoming
unmaintainable?
Cheers,
-- Alessandro Delgado