Re:Why Python is Slow: Looking Under the Hood
by rectangletangle on Friday May 09, 2014 @11:13PM
(#7724352)
I'm definitely a fan of Python's strategy. It's much better at detecting bugs early and often. That, and there's a distinction in Python between identity and equality, with the `is` and `==` operators respectively.
Re:Why Python is Slow: Looking Under the Hood
by thaumasiotes on Saturday May 10, 2014 @08:41AM
(#7725192)
Frankly, I think Perl has the best approach to this specific problem. We all want to do some string concatenation. We all want to render some non-string values as strings sometimes. So:
1 + 0 = 1
1 . 0 = 10
Just stop using + to concatenate strings.
x + y
where x and y are values I got from who knows where. Javascript shouldn't pretend to figure out what I mean by this, because in many cases, I'm talking gibberish, and all I have is a bug.
I'd rather not talk about this stuff in terms of "types." It's about assertions, and Python makes them early and throws the exceptions early. It's a defensive practice that you can emulate in any language, and your assertions can be much richer than anything that is typically thought of as a type.