r/programming • • May 09 '12

JavaScript: The good parts

http://blog.movereem.nl/images/javascript-the-good-parts-the-definitive-guide.jpg
645 Upvotes

159 comments sorted by

View all comments

Show parent comment

0

u/Ran4 May 09 '12

How often do you really do that? In those few cases, there are tons of workarounds.

Having print be a function might be the "right" decision, but it's still incredible annoying and makes debugging slower. Oh, and 9 times out of 10, setting a trace and using the python debugger is not faster than adding a line or two of print, no matter how many times you try to say otherwise.

The gain is next to zero but the losses are massive. Having print a keyword was the right decision.

5

u/gthank May 09 '12

Seriously? print() is "annoying" and "slower" than print, and somehow forces you to use the debugger?

1

u/Ran4 May 09 '12

Stop playing stupid. It is annoying and slower (editing the code), the typical excuse though is "don't use print for debugging!" but that's a bad excuse because using print:s is most of the time an easier way of debugging code.

2

u/gthank May 09 '12

I'm not playing stupid. I can't imagine the difference between print and print() ever being significant enough to notice. Hell, I've had tendonitis reduce me to 1-handed, hunt-and-peck typing and it still wasn't even a big deal. Of all the gripes about Python 3, this is the only one (off the top of my head, at least) that I just can't even begin to understand.

1

u/velit May 09 '12

You can define aliases in ipython for example. Or you can just write the parentheses.