lua-users home
lua-l archive

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


On Jul 7, 2012, at 9:17, Miles Bader <miles@gnu.org> wrote:

> Dirk Laurie <dirk.laurie@gmail.com> writes:
>> Are we really going to improve quality-of-life for the public
>> by fascistically taking away this freedom?
>
> Yes
>
> Sticking in a few calls to tonumber makes the code more readable, and
> not having the automatic coercion makes bugs easier to find (because
> they're less likely to be hidden), and speeds up execution.
>
> I think something that makes programs more readable, less buggy, and
> faster can be fairly thought of as "improving quality of life", for
> both the programmers and the usersd).  If it were a widely used
> feature, which made programs significantly easier to write, maybe
> those things wouldn't be worth it -- there's always a tradeoff -- but
> I don't think it is; not even close.
>
> [Personally, I stick in calls to "tonumber" _anyway_, even when
>
(snip)

I take it back. No meta methods for coercion. Maybe a c-accelerated
set of coercion functions included in the standard library?

I still think that only false should be false. Perhaps having a ?
operator: myvar?

Or an "exists" keyword

Might as well do it all at once! :)

-Andrew