News for hackers. Stuff that matters.
Re:CoffeeScript: less typing, bad readability by tjholowaychuk on Monday September 17, 2012 @07:13PM (#4535385)
both of those look really bad, try reading that sort of indentation when it's already 4+ indentations in, it's terrible
Re:CoffeeScript: less typing, bad readability by alecperkins on Monday September 17, 2012 @08:59PM (#4535724)
I do every day, both in CoffeeScript and in Python. I find things like braces frustrating, because I already keep it indented, and have to then manage the openings and closings. With proper 'aesthetics', indentation is perfectly readable. Plus, if something starts getting too indented than is readable, it's a sign that it needs to be refactored. (Whereas JavaScript looks messy even with otherwise sensible nesting.)
Re:CoffeeScript: less typing, bad readability by thezilch on Monday September 17, 2012 @10:05PM (#4535917)
Sorry, CS and Python treat whitespace as a significantly different beasts. It's a disservice to everyone to say, "I read <insert significant-whitespace-block language> everyday, therefore <insert language that substitutes anything from call points, to auto-insert this or that, infer types, etc> is just fine!"

I think a majority can grok and parse Python, but the same can certainly not be said for CS. It's unfortunate too, because it has some Good Parts.

Re:CoffeeScript: less typing, bad readability by alecperkins on Tuesday September 18, 2012 @02:19AM (#4536651)
I didn't mean to say "Python does it, so CoffeeScript is not a problem", but rather that both can suffer from too much indentation. CoffeeScript is a little more prone, given the callback-heavy nature of JavaScript, but similar treatment of surrounding whitespace is helpful in maintaining clarity. (Basic example: I find Python's standard of four-space indentation helps CoffeeScript readability, and prefer it over the popular two-space indentation.) And in both cases, excessive indentation is a useful signal.

Readability is very subjective and depends on the user's knowledge of the language, as well as personal style, or 'accent', if you will. Code written with, for example, leading commas in dictionaries instead of trailing commas just looks bizarre to me and is a little harder to read, to me, even though I like to do something similar and stack colons.

Re:CoffeeScript: less typing, bad readability by tjholowaychuk on Tuesday September 18, 2012 @12:07AM (#4536272)
yeah python is still much clearer than coffee. I used to somewhat prefer significant whitespace but coffee has definitely killed that for me haha. Seeing braces after looking at files of coffee is like a breathe of fresh air, it just lines up nicely for the eyes, even from an "artistic" stand-point I think the balance is more appealing