lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jun 12, 2014 at 11:10 AM, Tim Hill <drtimhill@gmail.com> wrote:
> For the second case, you place each “case” in its own function, and then put these functions into a table indexed by the “switch” expression. Voila! Constant time switch, with no new syntax needed.

Constant time with a painful amount of overhead, thus prompting the
requests for a "proper" switch statement. :P

/s/ Adam