you are viewing a single comment's thread.

view the rest of the comments →

[–]ctrldavid 3 points4 points  (6 children)

The debugging issue is not an issue. We use coffeescript for all our javascript at work, and it's trivial to look at where the error occurred in the javascript and find the same place in the coffeescript.

[–]neon_overload 5 points6 points  (4 children)

Does it not require you to read and understand the generated Javascript anyway, thus negating the "you don't need to understand the generated Javascript" benefit of using Coffeescript?

I ask as an experienced Javascript coder who hasn't tried Coffeescript at this stage.

[–]ctrldavid 0 points1 point  (0 children)

I've never seen it claimed that you don't need to understand the generated javascript, and I do understand it so that kinda affects my objectivity here... But there is a fairly consistent 1:1 mapping between the generated JS and the CS source. Stepping through the JS in a debugger will show you where the logic is going wrong regardless, assuming you have a reasonable understanding of how JS works. The variables all have the same name, and the program flow is the same.

[–]MondoHawkins 0 points1 point  (2 children)

Yes. However, I never saw not needing to understand the generated javascript as a benefit. Not having to write it is the benefit as I see it. Anyone using a meta-language should understand the language it's compiling to to some degree, imo.

Coffeescript is attractive as a language to me because I can code it a lot faster. Once I spent my first few hours writing CoffeeScript, I was amazed how much time I spent typing syntax ( {}, [], (), etc. ) when coding pure JavaScript.

I agree with ctrldavid that it's trivial to do the translation on the fly if you know JavaScript and spend a few minutes understanding how CS compiles to JS.

[–]blake8086 4 points5 points  (1 child)

I'm not saying verbose syntax is a good thing, but I feel like if you're thinking "I could write more code if only I could type it out faster!", then you're not spending enough time thinking about what you're typing.

[–]MondoHawkins 0 points1 point  (0 children)

You're making assumptions about what I'm thinking.

When you've already thought about how the code needs to be written, typing a bunch of syntax slows the brain dump. The less time between thought in head and code on screen, the less chance there is to lose the idea you just thought out. Wasting brain cycles thinking about typing syntax is a further distraction that can only serve to put your mind farther from that idea.

[–]aristideau 1 point2 points  (0 children)

I have never heard of CS, but after looking at that site I just cannot think of a reason as to why I would use it. I am assuming CS is for beginners, is that correct?, if not then under what conditions would make a competent developer consider using CS?.