Live data from Hacker News

CoffeeScript's Time is Waning For Me

mattgreer.org

1–10 of 67 posts

Re: CoffeeScript's Time is Waning For Me

#2
"As my project grows in size, significant whitespace becomes more and more of a problem. It’s just plain not readable or visually parsable. Your files become a wall of dense text. Damn you Python, damn you to hell!"

I would appreciate an explanation of this paragraph. How exactly does project size compound issues with significant whitespace? Are you indenting five levels or something?

Re: CoffeeScript's Time is Waning For Me

#3
> If you’re contributing to the JS community, you’re better off writing in JavaScript. More people will contribute and/or adopt your code.

Quality, not quantity. Maybe the higher quality contributors are more likely to get excited about a cs project over js.

Re: CoffeeScript's Time is Waning For Me

#4
post #2

"As my project grows in size, significant whitespace becomes more and more of a problem. It’s just plain not readable or visually parsable. Your files become a wall of dense text. Damn you Python, damn you to hell!" I would appreciate an explanation of this paragraph. How exactly does project size compound issues with significant whitespace? Are you indenting five levels or something?

I would agree that the indentation in CoffeeScript causes confusion, especially since the recommended size is 2 spaces.

Re: CoffeeScript's Time is Waning For Me

#5
post #2

"As my project grows in size, significant whitespace becomes more and more of a problem. It’s just plain not readable or visually parsable. Your files become a wall of dense text. Damn you Python, damn you to hell!" I would appreciate an explanation of this paragraph. How exactly does project size compound issues with significant whitespace? Are you indenting five levels or something?

I'm curious about this statement as well. It sounds like the author might be:

- Creating big complex methods instead of breaking code into smaller (testable) ones?

- Nesting callbacks multiple levels deep, instead of using something like Node Async to flatten out code flow?

- Choosing a Coffeescript code style that leads him to put callbacks on their own line, or something like that?

- Something else?

Not implying the author is wrong by any means - there are probably some scenarios where coffeescript isn't the best whitespace-wise. The thing is, readability is one of the huge reasons I use coffeescript, and I feel like it's largely compatible with the whitespace patterns I used in javascript. Even for large NodeJS or Angular projects, I've found that it is consistently easier to read and edit than Javascript.

Re: CoffeeScript's Time is Waning For Me

#6
post #4
post #2

"As my project grows in size, significant whitespace becomes more and more of a problem. It’s just plain not readable or visually parsable. Your files become a wall of dense text. Damn you Python, damn you to hell!" I would appreciate an explanation of this paragraph. How exactly does project size compound issues with significant whitespace? Are you indenting five levels or something?

I would agree that the indentation in CoffeeScript causes confusion, especially since the recommended size is 2 spaces.

I don't know any worthwhile editor that can't show tabs.

Re: CoffeeScript's Time is Waning For Me

#7
post #3

> If you’re contributing to the JS community, you’re better off writing in JavaScript. More people will contribute and/or adopt your code. Quality, not quantity. Maybe the higher quality contributors are more likely to get excited about a cs project over js.

Maybe, but many JS programmers won't touch anything CS.

Re: CoffeeScript's Time is Waning For Me

#8
Unlike the author, I love significant whitespace and am enjoying nimrod lately with it.

I'd love to see a CoffeeScript variant for TypeScript. TypeScript has the structural things of CoffeeScript and more (OO paradigms, member visibility, modules, typing, etc) but much more verbose. I have tinkered w/ the CoffeeScript grammar/parser adding in a backslash to denote to type (e.g. "(x\int) -> x * x") and the TypeScript AST and compiler are very easy to work with. I just haven't had the enthusiasm to build a complete project. That would be my dream language. Until then I think scala.js is a great fit.

Re: CoffeeScript's Time is Waning For Me

#9
post #2

"As my project grows in size, significant whitespace becomes more and more of a problem. It’s just plain not readable or visually parsable. Your files become a wall of dense text. Damn you Python, damn you to hell!" I would appreciate an explanation of this paragraph. How exactly does project size compound issues with significant whitespace? Are you indenting five levels or something?

I did find that odd. Whitespace helps you get away from "a wall of dense text." I'm not clear on how mandatory whitespace could exacerbate the "wall of dense text" problem.

Does the author want to skip the indentation some of the time? I can think of a few marginal cases where that would be preferable. But in the vast majority of cases, you should indent any nested structure that has its own line(s). Indentation is essential for readability.

Re: CoffeeScript's Time is Waning For Me

#10
I don't do a ton of js programming, but I did poke around with cs a bit. For me, clean iteration seemed like the biggest win. And then I discovered underscore/lodash. So I don't do as much cs anymore.

Essentially, js isn't all that busted. The busted parts can for the most part be worked around with underscore/lodash and sweet.js (for the really ambitious)

sweet.js

http://sweetjs.org/

pretty neat pattern matching library written with sweet.js

https://github.com/natefaubion/sparkler

I do most of my work in Python, so the above experiences and biases may be a direct result thereof.

Post reply on HN