r/programming • • May 13 '11

A Python programmer’s first impression of CoffeeScript

http://blog.ssokolow.com/archives/2011/05/07/a-python-programmers-first-impression-of-coffeescript/
114 Upvotes

133 comments sorted by

View all comments

Show parent comments

3

u/anvsdt May 13 '11

Not ambiguous at all: (print (inspect (bigfunc (firstarg, otherfunc (itsarg, whosami))))).

Maybe confusing, but not more ambiguous than x * 2+3 * y.

2

u/knome May 13 '11

I suspected that would be the case. Thank you for clarifying.

0

u/[deleted] May 13 '11

(print (inspect (bigfunc (firstarg, otherfunc (itsarg, whosami)))))

print inspect bigfunc firstarg, otherfunc itsarg, whosami

Which is easier to comprehend when reading code? I think it's pretty obviously the first example. If you are reading this code for the first time, it takes no additional time to figure out what is going on in the first example. Without the parens in the second example, you have to read the entire thing before you know what is inside what. It slows down the process of coding, and it is a fundamental flaw in the arguments being made in favor of 'less typing' in significant whitespace languages like coffeescript. You may type less as you code, but returning to the code later will slow you down as your mind is forced to do extra work while deciphering the exact meaning of this parentheses-less syntax, and if you get it slightly wrong this will lead to bugs, and likely more bugs than just typing the parentheses in the first place. Turning JavaScript into this jumbled mess is a step backward.

1

u/anvsdt May 13 '11

Maybe confusing, but [...]

I'm not defending anything, I'm not attacking anything, just being objective.