TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Javascript or CoffeeScript for a newbie?

7 点作者 leoalves将近 12 年前
I am starting to learn javascript. I think CoffeeScript is easier to write and read. Do you guys recommend learning javascript using CoffeeScript ?

8 条评论

rahilsondhi将近 12 年前
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.
CyberFonic将近 12 年前
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 未加载
rubiquity将近 12 年前
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_189将近 12 年前
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.
madlee将近 12 年前
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
tantalor将近 12 年前
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.
mk3将近 12 年前
Learn javascript then coffeescript. If you already know javascript very well then it&#x27;s your choice. I have stayed with javascript myself.
ulisesrmzroche将近 12 年前
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.