Re: Switch/Case statements revisited (using tables?)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Switch/Case statements revisited (using tables?)
- From: Mark Hamburg <mhamburg@...>
- Date: 2007年11月08日 09:38:13 -0800
on 11/8/07 9:23 AM, Javier Guerra at javier@guerrag.com wrote:
> On 11/8/07, Mark Hamburg <mhamburg@adobe.com> 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.
Mark