[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Arithmetic on strings
- From: Miles Bader <miles@...>
- Date: Sat, 07 Jul 2012 23:16:47 +0900
Dirk Laurie <firstname.lastname@example.org> writes:
> Are we really going to improve quality-of-life for the public
> by fascistically taking away this freedom?
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
I'm writing "tiny scripts". Even in a language like AWK, which is
much more common used for tiny "use once" scripts, I think the
automatic coercion is a bad feature.]
(also you used the word "facist", which makes your argument
automatically wrong... :)
`Suppose Korea goes to the World Cup final against Japan and wins,' Moon said.
`All the past could be forgiven.' [NYT]