Live data from Hacker News

CoffeeScript's Time is Waning For Me

mattgreer.org

61–67 of 67 posts

Re: CoffeeScript's Time is Waning For Me

#61

Can anybody explain some good use cases of implicit return? When I was doing a project in CoffeeScript last year (the only time I've used it), I found myself just using the return keyword explicitly because it was more readable, and I never ran into the issue the article talks about where it can be bad to accidentally return something from a function that should return null/undefined. When would implicit return make…

> I can see them being more readable to somebody coming from a Haskell or LISP background than to somebody like me who has worked mostly in C, Java, and Python

Ruby also has explicit returns. The idea is, every statement is an expression, and so has a return value. You don't need to figure out about whether a statement does or not, it just always does. One less thing to have to think about.

Other things, too, but that's one that that sticks out for me.

Re: CoffeeScript's Time is Waning For Me

#62

I gave CoffeeScript a shot, and frankly I don't like these JS "wrapper" languages. First of all if you want anyone else to help you with your code its likely that they don't know the wrapper's syntax and will have to waste a bunch of time learning it. My boss got super excited about it when it first came out and it just caused a lot of headache and wasted time. First I (and all my coworkers) had to learn the language…

> will have to waste a bunch of time learning it. Please define "bunch of time". I'm having trouble imagining how learning CoffeeScript would require more than a couple of hours for an experienced developer.

A couple of hours is a quite a bit of time IMO. Especially if there's alot of people that need to learn the language.

Re: CoffeeScript's Time is Waning For Me

#63
post #51

> [tooling] is perfect with JavaScript Tooling is terrible with JavaScript. Even if you use something like Tern, it's still really bad. You can pass arbitrary arguments to functions. Types and arity isn't checked. Optional positional/named arguments (with default values) don't exist. Passing some options object and "foo = foo || 5" is the best you can do. You can't tell, with absolute certainty, that some object does…

My point is JS tools work with JS as intended, and work with CS to varying degrees of success and with a variety of ways they handle CS. I was a C# developer for many years, so I know what I'm missing.

Re: CoffeeScript's Time is Waning For Me

#64
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.

In my experience, the most prolific and arguably best JS developers are mostly anti CS.

Re: CoffeeScript's Time is Waning For Me

#65
post #16
post #5

Earlier 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…

I think that's not a problem with significant whitespace, but the problem with CoffeeScript syntax. I'm programming in Python and had been programming in Coffescript and I always found Coffescript code much harder to read than code in Python. I don't know exactly what causes this, but my guess is that indented blocks of code in CoffeScript can appear after any line, so you don't have visual anchors that will indicate where one block begins and other ends. In Python however, indentation is always comes after keywords like def, if, class, for etc... and those are always highlighted by your editor so your eyes can always catch the block start very quickly.

Re: CoffeeScript's Time is Waning For Me

#66

Earlier quoted context omitted.

> will have to waste a bunch of time learning it. Please define "bunch of time". I'm having trouble imagining how learning CoffeeScript would require more than a couple of hours for an experienced developer.

A couple of hours is a quite a bit of time IMO. Especially if there's alot of people that need to learn the language.

I mean, obviously a few hours isn't honestly that much. But in terms of the actual benefit you're getting by learning CS makes it not worth it at all. Workflow improvements are negligible (if anything, it probably worsens your workflow because of the extra compilation step). There's no compelling performance enhancement. You aren't getting any real benefit from learning CoffeeScript other than some feel-good syntactical sugar.

Re: CoffeeScript's Time is Waning For Me

#67
post #16
post #5

Earlier 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…

I totally agree with you about the spacing between methods. I've actually found myself putting a double-space between methods, but I do that in most languages so it hasn't bugged me as much. Thanks for posting the image!
Post reply on HN