Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's neither a subset nor a superset of JavaScript. It's a language that isn't JavaScript that is compiled to JavaScript. There are to-JavaScript compilers for many languages now including Scala, Kotlin, Clojure and more. Maybe people who write CoffeeScript as part of some public thing consider themselves to be part of a JavaScript project, but I wouldn't.


You know that "languages that compile to JavaScript" (thanks for not using the word "transpiled", btw) include JavaScript? Babel, Traceur - does it ring a bell? Would you argue that their users are not a "part of JavaScript"? What about TypeScript (it's just an implementation of some ES6 features + a powerful linter)?

Coffee is just a set of syntactic improvements (well, it's debatable - let's say "syntactic changes") over JavaScript. JS is too weak a language to implement this syntactic sugar inside of it, so there is a need for an external tool. But if you take a look at any Lisp, you'll see that people are building syntactic abstraction inside a language and that it doesn't make their code "a different language compiled to (their kind of) Lisp".

This is not to say that everything compiled down to JS is still JS. But the difference is quite neatly explained in Mathias Felleisen great paper: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.51.4... All that Coffee does are local transformations, equivalent to what you could do with Lisp or Nim or Dylan macros.

[EDIT: removed the "soooo cute" opening sentence, as it was brought to my attention that it distracted readers]


> Soooo cute...

I stopped reading your reply after this. Just FYI, HN doesn't condone bad attitudes. You'll end up getting hell banned.

Having said that, my down-voted comments are factual. They are not incorrect, they were down voted by people who have strong emotions about CoffeeScript.

True or false? All the statements below are true.

Trix is writen in CoffeeScript?

CoffeeScript is not superset or a subset of JavaScript?

Are there other languages that compile to JavaScript?

I don't consider projects written in CoffeeScript JavaScript projects?

I gave simple statements of fact that were not incorrect, and they got down voted and emotional replies.


> I stopped reading your reply after this.

I edited the post, removing this unfortunate opening sentence. It was intended as humorous, which could have backfired.

> Just FYI, HN doesn't condone bad attitudes. You'll end up getting hell banned.

user: klibertp created: 1159 days ago

That is to say, you don't need to tell me what HN is about.

> They are not incorrect, they were down voted by people who have strong emotions about CoffeeScript.

No. I downvoted you, and I have no attachment to CoffeeScript. I downvoted you because in your earlier comment you wrote that it's "a shame" that Trix is written in Coffee, without any rationale.

> I don't consider projects written in CoffeeScript JavaScript projects?

Here, similarly, you didn't provide any explanation of why do you think that way. Without such an explanation what you wrote would be unacceptable in many other contexts. I won't cite examples, but definitive statements about what something is or isn't in general should be backed by convincing arguments.

---

You not considering CS projects a JS projects is a very debatable opinion. It's nuanced debate and has a great depth. Simplifying it to a simple statement without providing any context looks ignorant at best, and like an ill will at worst. Which is why I reacted.

[EDIT: a bit of wording fixes]


> in your earlier comment you wrote that it's "a shame" that Trix is written in Coffee, without any rationale.

Where did I say that? I didn't say that at all. I'm on my threads page writing this reply to you and a search for shame only brings up your comment so whoever you're quoting isn't me.


Looks like you're right. Sorry. I must have confused you with some other commenter I read on HN today, it's a mistake on my part.

Having admitted this much, I'm still waiting for your explanation why you wouldn't "consider projects written in CoffeeScript JavaScript projects". I'd still downvote you for stating such a strong opinion without providing any rationale.


They're not JavaScript because the language used to write the source code isn't in JavaScript. Babel is used to bring modern JavaScript features into older browsers, but you're still writing JavaScript. If the language you are writing doesn't at least attempt to conform with some signficant portion of the ECMAScript specification, it's not JavaScript.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: