[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Arithmetic on strings
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 7 Jul 2012 13:44:21 +0200
2012/7/7 steve donovan <firstname.lastname@example.org>:
> On Sat, Jul 7, 2012 at 11:33 AM, Miles Bader <email@example.com> wrote:
>> Me too.
> Ditto. The code it breaks is code that's going to break 'by accident'
> in some way later.
There's just one thing: input of numbers. At present, I can write:
grade="Ann 57, Bob 64,Cat 77, Don 62, Eve 51"
for n in grade:gmatch("%d+") do s=s+n; k=k+1 end
I don't see this code breaking "by accident".
Are we really going to improve quality-of-life for the public
by fascistically taking away this freedom?
I vote for this solution: remove string coercion, but make it
easy to enable/disable the necessary metamethods that give
the same effect. For at least one release, let string coercion
by metamethods still be the default.