News for hackers. Stuff that matters.
Re:Why Python Is Not My Favorite Language (2016) by lmm on Tuesday June 20, 2017 @12:10PM (#14595791)
> Can you think of a (non-contrived) example where automatic promotion to float is going to cause a non-trivial error when computing (say) a household budget?

Having your share of holiday costs come out as NaN is fiddlier than getting an exception at the point where you actually divided by zero.

Re:Why Python Is Not My Favorite Language (2016) by Turing_Machine on Tuesday June 20, 2017 @09:31PM (#14599972)
Both of those are runtime errors, though.

The "type safe" guys like to pretend that their approach can catch all that stuff at compile time. It does catch a certain class of error, but at the cost of making the code take much longer to write. That doesn't work in a world where your competitor is iterating five times while you're still building the first one. Excellent way to get your milkshake drunk, that.

Re:Why Python Is Not My Favorite Language (2016) by lmm on Wednesday June 21, 2017 @04:07AM (#14601835)
> Both of those are runtime errors, though.

Sure, the point is that using integer arithmetic for integer calculations gets you better error reporting that saves you time when tracking odwn other bugs.

> The "type safe" guys like to pretend that their approach can catch all that stuff at compile time. It does catch a certain class of error, but at the cost of making the code take much longer to write. That doesn't work in a world where your competitor is iterating five times while you're still building the first one.

My experience is that I can iterate a lot faster if the compiler's able to help me catch errors faster. It doesn't slow down writing the code; almost anything I'd write in say Python translates directly into the same Scala. (I guess the language pushes me into defining my data structures a little more explicitly, but that's something I'd want to do in Python anyway if only for documentation reasons).

Re:Why Python Is Not My Favorite Language (2016) by emodendroket on Wednesday June 21, 2017 @09:14AM (#14603435)
Define "much longer to write." I don't think that claim is true.