20 ms·
CoffeeScript 1.1.0 released
- TrevorBurnham 15y agoThe previous version was 1.0.1. Mostly minor changes; nothing likely to break existing code. The REPL is dramatically improved.
- endtime 15y agoTrevor (or someone else), could you explain this note? >Function calls can be used as default values for parameters. What can I do in 1.1.0 that I couldn't do in 1.0.1? In 1.0.1, I just did the following: coffee> x = 0 0 coffee> f = (g=(do -> x++), h=(do -> x++)) -> [g, h] # (compiled JS) coffee> f() 0,1
- deleted 15y ago[deleted]
- jashkenas 15y agoThanks for mentioning it -- the fix was actually to correct a regression from a previous commit, not a true bugfix versus 1.0.1. I've removed that line from the changelog.
- jckarter 15y agojashkenas (CoffeeScript author) replied to you, but for some reason he's deadbanned: > Thanks for mentioning it -- the fix was actually to correct a regression from a previous commit, not a true bugfix versus 1.0.1. I've removed that line from the changelog.
- endtime 15y agoCool, thanks for clarifying.
- veidr 15y agoI (now) know that Red Dead was banned in the UAE, and pictures of the US military dead are banned by the Pentagon, but what is 'deadbanned' in this context?
- jckarter 15y agoIf you're banned here, you aren't locked out of the site or prevented from posting. Your posts are just marked so that only you (and other users who have chosen "show dead comments" in their preferences) can see them, and there's no indication that you've been blacklisted. It's terrible.
- deleted 15y ago[deleted]
- rdtsc 15y agoFeatures summary (others seem like bug fixes): * Output in the REPL is now colorized, like Node's is. * All text/coffeescript tags should now execute in the order they're included. * Function calls can be used as default values for parameters. * Splatted parameters are declared local to the function.
- power78 15y agoI'm confused. Is javascript really that hard to use that we need CoffeeScript? Why was CS even created?
- swaits 15y agoBecause someone wanted to? Folks are using it. Isn't that enough for you? On top of that, it's quite a nice little language. Comprehensions are very convenient along with regular iteration. And you get most of the jslint passing stuff for free. Plus, if you don't like it, don't use it.
- power78 15y agoSorry if I came off as being rude, it was not my intention. I was merely asking questions, but I guess it seemed harsh.
- swaits 15y agoI suggest you play with it a bit. It really is a "nicer javascript". The only thing it's missing is support, primarily in the form of debugging tools. But that's coming.
- rdtsc 15y agoIt might not be as 'hard' conceptually to use, but it just has some dirty areas that are sort of make it unpleasant to use so it leaves a bad taste in some programmers mouths. * 0 == '' is true, really? what about 0 == '0', also true! * What is 'this'? Well it depends on where you are and there is a long article someone posted somewhere. To figure it all out... * Brace block != new scope. * No nested namespaces -- all is in a global scope. And there are others. Again. Not hard just kind of unpleasant, therefore CS.
- jashkenas 15y agoIf you're (re-)installing it with the newly launched npm 1.0, remember to use the -g flag to make the "coffee" command available systemwide.
- cageface 15y agoThanks. It would be nice if this were a little better documented. I fished around for a fix for my missing coffee command for a while.
- tuxychandru 15y agoGlobal and local installations are documented here. http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-in...
- Andrex 15y agoWill any of the browser makers implement implicit text/coffeescript support? That'd be neat.
- TrevorBurnham 15y agoFirefox is definitely going to have CoffeeScript debugging support in the future, though it's not yet clear exactly what form that'll take.
- rubergly 15y agoIs this speculation or confirmed?
- TrevorBurnham 15y agoAs Jeremy says, it's an active ticket, and Brendan Eich himself has assured me that he's committed to it.
- jashkenas 15y agoIt's an open, actively-worked-on ticket -- and it's not just CoffeeScript debugging support. It's proper line + column number mapping for anything that compiles to JS. It'll be a boon for straight-up minified JS as well.
- MatthewPhillips 15y agoThat wouldn't be useful except for debugging. You can already do this if you also include the compiler. You'd never want to include uncompiled coffeescript in production, it can't be minified to the extent that js can.
- SupremumLimit 15y agoWhat exactly do you mean by "can't be minified to the extent that js can"? Why is that? CoffeeScript files are usually about 1/3 smaller than corresponding JS to begin with.
- MatthewPhillips 15y agoI'm starting to really dig coffeescript. Using it in a new project and can see what people are raving about. I wish there were better examples of creating cakefiles though. Little documentation on this. I think it assumes that everyone has a ruby background. I'd like a cakefile with a task to compile all of my .coffee files. Seems like that should be easy, but I don't see an example of how to do it.
- geraldalewis 15y agoDid you see the documentation in the wiki? I ask because it took me a while to find it initially, and even then, re-locating it was sometimes difficult: https://github.com/jashkenas/coffee-script/wiki/%5BHowTo%5D-Compiling-and-Setting-Up-Build-Tools https://github.com/jashkenas/coffee-script/wiki/%5BHowTo%5D-...
- edw 15y agoI've looked into CoffeeScript, and while I really like the sentiment—routing around JavaScript's warts—I fundamentally disagree with the technique employed to achieve the goal. What the world needs is less syntax, not more. Perl, Ruby, and Haskell—the inspirations for CoffeeScript, as near as I can tell—are, as a recently-linked entry called Perl, programming languages that you have to constantly use to keep your programming skills. For all its problems, as long as you can remember to use === and friends instead of ==, JavaScript's syntax is relatively obvious, if unweildly, to anyone who grew up in a C dominated world. Fargo, the recently-linked Scheme in JavaScript, is something I an get behind personally, though sadly Clojure is becoming the default Lisp my mind thinks in. We need to declare a moratorium on new syntax. With Lisp, C, Python, and a couple other languages (maybe), we have all the syntax we need. Novelty is not innovation. New is not better. We live in a world where utility players, i.e. everyone in a startup, already have to think in terms of too many different languages.
- stdbrouw 15y agoEhm, I've been programming in Python for quite a few years now, and CoffeeScript syntax is pretty much Python with a smattering of Ruby (or the other way around), and some niceties like using the question mark for safe navigation or having "yes" as an alias to "true". That hardly makes for a sigil overdose. What exactly is tripping you up?
- Cushman 15y agoWe all agree that some syntaxes are better than others. So you're willing to settle for JavaScript; that's cool, CoffeeScript is 100% compatible. (More than, if you consider that even bad CS compiles to good JS.) But complaining about novelty reeks of telling us kids to get off your lawn. Some syntaxes are better than others. We haven't found the best one. Innovation is still possible. Hackers innovate. Get used to it.
- thesz 15y agoYour comment finally made me to acquaint myself with the precise meaning of word "innovation". http://en.wikipedia.org/wiki/Innovation http://en.wikipedia.org/wiki/Innovation I think that hackers invent, not innovate. Innovation is too risky to be taken by one or even little group. It is something between an act of changing values (or axioms) of system and the process of that system change. I also think that innovation is too pompous term in the discussion of programming languages syntax. http://en.wikipedia.org/wiki/Invention http://en.wikipedia.org/wiki/Invention Invention is much lesser term and much more nimble. And it could provoke innovation, of course. But for innovation we need semantics more than syntax, I think.