[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Switch/Case statements revisited (using tables?)
- From: Mark Hamburg <mhamburg@...>
- Date: Thu, 08 Nov 2007 09:38:13 -0800
on 11/8/07 9:23 AM, Javier Guerra at email@example.com wrote:
> On 11/8/07, Mark Hamburg <firstname.lastname@example.org> wrote:
>> The downside to the dispatch table is that it instantiates the closures for
>> all of the branches of the switch. That's not something you want to be doing
>> inside a loop.
> that's why i separated the declaration of the dispatch table from its usage
However, then the functions can't generally see the necessary upvalues.