Live data from Hacker News

CoffeeScript 1.3.0 is out

coffeescript.org

31–40 of 55 posts

Re: CoffeeScript 1.3.0 is out

#31
post #21
post #17

Earlier quoted context omitted.

You're still coding in assembler I assume?

The difference between assembly and (for example) C is vast. The difference between JS and CS is much smaller. Whether the difference in usability and maintainability is worth the extra layer of complexity is an important question.

It's an important question, but one that many people have decided has a clear answer (in their judgement, for their own coding circumstances). In many cases, though not all, that answer is yes.

For me, it's similar to using a powered driver when assembling furniture.

Yes, there's added complexity. (Need to keep the battery charged; need to adjust the force dial to control how hard the screws and bolts are tightened).

But yes, dealing with that small bit of added complexity is worth it. (The furniture is assembled more quickly, more correctly, and with less irritation on my part.)

I could of course tighten all those bolts manually. But I don't wanna.

Re: CoffeeScript 1.3.0 is out

#32
post #5

No IcedCoffeescript's await and defer integration yet? Will we ever see them in Coffeescript's core?

First, the relevant thread: https://github.com/jashkenas/coffee-script/pull/1942 It's not terribly likely that we'll see an IcedCoffeeScript merge soon, given that the basic needs that a merge would entail haven't been addressed. A few of them: * We don't want to add helper libraries, like "iced.Rendevous", "icedlib.Pipeliner", or "icedlib.timeout" to our generated JS. * Last time I checked, there was a significant s…

Thanks for the 1.3 release, I was running out of lowercase letters. I'll try to reply to these concerns in the pull-request, but have been busy. Also, looks like I have rebasing work to do....

The good news is that ICS is working well in practice for us, we're still really happy with it!

Re: CoffeeScript 1.3.0 is out

#34

Now that both ?= and or= throw errors with an undefined variable, is there another idiomatic way to write Ruby's ||= in CoffeeScript?

I am not sure if this directly addresses your issue or not, but check out this reply to the article (1.3.1 just released to fix a problem undeclared globals and or= ) http://news.ycombinator.org/item?id=3824543

Re: CoffeeScript 1.3.0 is out

#36
post #30
post #14

Please forgive me for intruding the holyness of CoffeeScript, but I always found and always will find CoffeeScript appaling and unusable. A wrapper for otherwise syntactically and otherwise perfectly readable and codeable JavaScript? Come on guys. Just learn JS, will you?

We have learned JS, probably you forgot that you need to know it to learn CS?

This and debugging are my two biggest gripes about CoffeeScript. If you are saying this, then you probably never learned JavaScript to the extent that would be required to write what you are writing in CoffeeScript. Maybe that is a good thing and a testament to the power of CoffeeScript.

I am currently working with a bunch of people who don't understand functional scope nor closures (fully). They do, however, understand that sometimes they need to use "=>" for function declarations instead of "->".

Re: CoffeeScript 1.3.0 is out

#37
post #11

"CoffeeScript now prints a Generated by CoffeeScript VERSION header at the top of each compiled file." From what I can tell there's no switch to optionally disable this? I can see how it could be useful to keep unaware developers from making js changes in compiled files, but other than that, what other purpose does this serve?

The most important thing it does is tell you which version of CoffeeScript was used to generate the file. Inevitably, as more and more coffee-generated-JavaScript begins to wind up in more places, we don't want to end up in a situation where you have to use trial and error, or distant memory, to figure out which version to use to rebuild the JS.

wow, the insanity continues.

Re: CoffeeScript 1.3.0 is out

#38

For folks that are curious, we wanted to get these changes out the door -- strict mode syntax errors being a big one -- so that source maps can be the focus of the next release (probably 1.4.0).

Regarding source maps... it feels like the solution to the wrong problem. Why are we still pushing minified/obfuscated Javascript to the browser anyway? What's wrong with standardizing on a bytecode format instead (e.g. JVM)?

This is in the works already with Google's PNaCl. I believe the bytecode format is based on LLVM IR.

Re: CoffeeScript 1.3.0 is out

#39
post #27
post #14

Please forgive me for intruding the holyness of CoffeeScript, but I always found and always will find CoffeeScript appaling and unusable. A wrapper for otherwise syntactically and otherwise perfectly readable and codeable JavaScript? Come on guys. Just learn JS, will you?

I already know JavaScript, and prefer CoffeeScript. But thanks for sharing your irrelevant opinion, and enjoy your false sense of superiority.

I can see that the parent comment was being a bit of a jerk, but why are all the comments in response (such as this one) being even worse? You could actually say something constructive in response instead of just resorting to personal attacks...

Re: CoffeeScript 1.3.0 is out

#40
post #29

Earlier quoted context omitted.

The most important thing it does is tell you which version of CoffeeScript was used to generate the file. Inevitably, as more and more coffee-generated-JavaScript begins to wind up in more places, we don't want to end up in a situation where you have to use trial and error, or distant memory, to figure out which version to use to rebuild the JS.

This is not necessary since you usually add the CS version to your dev dependencies (package.json). That should be enough. The resulting JS should not show any reference to CS at all.

You assume coffee code running in the context of a npm-based package.

coffee can also be used in the browser using the Rails asset pipeline (where you'd have the Gemfile, granted), or other methods (where you might have no indication).

The only place where I would like this line not to be shown is when I try to sneak coffee code into a codebase where only specific languages (JS in this case) are allowed and all code has to be originally written in any of these languages.

But honestly, if you are this devious, removing the line will be easy for you and, secondly, even though the coffee compiler produces really nice JS code, one glimpse is usually enough to recognize coffee compiler output as such, so removing that one line hides nothing.

Post reply on HN