"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?
CoffeeScript's Time is Waning For Me
11–20 of 67 posts
Re: CoffeeScript's Time is Waning For Me
#12Re: CoffeeScript's Time is Waning For Me
#13"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 would argue there are bigger problems with CoffeeScript, such as empty blocks being legal. For example:
if foo
bar()
Is totally legal. But 99% of the time, you really mean: if foo
bar()
In Python, the former is a syntax error and there is an explicit pass call to demonstrate that the block is empty. But in coffeescript, it's easy to accidentally write that code and it looks right when you're doing a quick read through. Again, I think 4 spaces would help as you would be expecting a larger indentation.Re: CoffeeScript's Time is Waning For Me
#14Personally, though I'm looking at Dart rather than ES6.
Re: CoffeeScript's Time is Waning For Me
#15> 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
#16"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 th…
Here is a typical snippet of my code as seen in my editor: http://i.imgur.com/2yVhgcz.png
IMO, those four methods really bleed together and are hard to discern, not to mention the if statements. I also think for the most part I stick with code that's "whitespace friendly", getAll there is a really long method by my standards.
Yeah, I could put more blank lines between the methods and probably some other things. But I also think a closing brace or an 'end' makes a world of difference. Really helps break up the space and compartmentalize it.
Not everyone thinks this of course. For many code like this is just fine. Like I said, it's all preference.
Re: CoffeeScript's Time is Waning For Me
#17Earlier quoted context omitted.
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 th…
I'm the author of the blog post. Significant whitespace is pretty dividing, and really boils down to preference. I have a strong dislike for it, and have avoided any language with it, CoffeeScript being the only exception. Here is a typical snippet of my code as seen in my editor: http://i.imgur.com/2yVhgcz.png IMO, those four methods really bleed together and are hard to discern, not to mention the if statements. I…
Re: CoffeeScript's Time is Waning For Me
#18Earlier quoted context omitted.
I'm the author of the blog post. Significant whitespace is pretty dividing, and really boils down to preference. I have a strong dislike for it, and have avoided any language with it, CoffeeScript being the only exception. Here is a typical snippet of my code as seen in my editor: http://i.imgur.com/2yVhgcz.png IMO, those four methods really bleed together and are hard to discern, not to mention the if statements. I…
Try removing the indentation guides or decreasing their contrast so that they are just barely visible. They appear to cause strong visual grouping between code blocks and make it harder to see what's what.
Re: CoffeeScript's Time is Waning For Me
#19Re: CoffeeScript's Time is Waning For Me
#20Furthermore, because CoffeeScript requires (sort of) a compilation step, errors are caught and debugging becomes MUCH easier than it ever was with plain JavaScript. Most text editors now have plugins that will compile selected text to JavaScript so you can preview the end result and make sure that you're getting the output you want.
The better part? When JavaScript best practices evolve, CoffeeScript can evolve with it, but the code can more-or-less stay the same. Awesome!