TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Javascript or CoffeeScript for a newbie?

7 pointsby leoalvesalmost 12 years ago
I am starting to learn javascript. I think CoffeeScript is easier to write and read. Do you guys recommend learning javascript using CoffeeScript ?

8 comments

rahilsondhialmost 12 years ago
Absolutely javascript. You'll be making a mistake by using CoffeeScript first. It's very important to understand the underlying language before using a meta language like CoffeeScript.
CyberFonicalmost 12 years ago
I tried to use CS first and found that I needed to really understand JS in order to debug stuff that didn&#x27;t work, and you get a lot of that with DOM.<p>So I&#x27;ve learnt a fair bit of JS and now I just can&#x27;t be bothered to write in CS, JS is really not that bad if you understand that JS is NOT class-oriented and CS ends up only obscuring reality, not altering it. Which brings me back to why I had to learn JS in the first place.
评论 #5900412 未加载
rubiquityalmost 12 years ago
I had the bare fundamentals of JavaScript down (constructors, the prototype object, anonymous functions&#x2F;callbacks) and I did quite well once switching to CoffeeScript. I really recommend using the coffeescript.org &quot;Try CoffeeScript&quot; feature so you can see what your CoffeeScript gets compiled into. One thing I wish I understood better going into it was function scope or scope in general, I remember getting caught up on this quite a bit. I definitely have an easier time turning my thought into code using CoffeeScript, YMMV.<p>There&#x27;s a great free e-Book hosted on GitHub that is written by Alex MacCaw. I recommend checking it out. Here&#x27;s the link: <a href="http:&#x2F;&#x2F;arcturo.github.io&#x2F;library&#x2F;coffeescript&#x2F;" rel="nofollow">http:&#x2F;&#x2F;arcturo.github.io&#x2F;library&#x2F;coffeescript&#x2F;</a>
clockwork_189almost 12 years ago
I would recommend javascript. Coffeescript is just a &quot;prettier&quot; syntax for javascript but in the end it just compiles down to js.<p>Learn JS and learn to write good JS! I personally hate CS because I some people take that route to avoid writing clean JS, just because CS looks nicer. Once you truly learn how js works, migrating to CS will be very simple.
madleealmost 12 years ago
Javascript, hands down. You&#x27;ll have a harder time going from CS -&gt; JS than you will from JS -&gt; CS, and knowing <i>only</i> CoffeeScript really narrows what you can do
tantaloralmost 12 years ago
It depends on your goals. If you just want to get stuff done, CS will make that easier. If you want to publish code or learn web programming, go with JavaScript.
mk3almost 12 years ago
Learn javascript then coffeescript. If you already know javascript very well then it&#x27;s your choice. I have stayed with javascript myself.
ulisesrmzrochealmost 12 years ago
If you&#x27;re new to programming, then start with JS, because there&#x27;s a lot more documentation and tutorials out there. If you&#x27;ve already got another programming language under your belt, then go straight to CoffeeScript. You can always look at the compiled js if you want, but you&#x27;re practically never going to want to.