[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: orif
- From: Duncan Cross <duncan.cross@...>
- Date: Fri, 14 Aug 2015 19:58:45 +0100
On Fri, Aug 14, 2015 at 7:48 PM, Andrew Starks <andrew.starks@trms.com> wrote:
> Points + AND - for being clever, though. This is one of the times when
> I *feel* like I'm inefficient in lua:
>
> local the_type = type(foo)
>
> if the_type == 'table' then
> --- something
> elseif type == 'number' then
> --- blah
I don't see how the given proposal would affect this, though? The
proposal only adds the ability for switch-like fall-throughs, not
switch-like case syntax - you'd still have to do full (x == y)
comparisons in each clause.
-Duncan