Poll: Have you moved from JavaScript to CoffeeScript?
71–80 of 178 posts
Re: Poll: Have you moved from JavaScript to CoffeeScript?
#72I have nothing against CoffeeScript, and I've used it on a few things, but in general I find JS to be an enjoyable language to work in. If I had more issues with the syntax or something, I might find the switch to CoffeeScript worthwhile.
Yes, and why would I want less of JavaScript's syntax in my life when it has so much overlap with other languages I use like PHP?
Re: Poll: Have you moved from JavaScript to CoffeeScript?
#73Re: Poll: Have you moved from JavaScript to CoffeeScript?
#74I think you guys obsess too much about programming languages. I doubt that anybody doing something useful cares about THAT "wohooo expressiveness". JS is alright, dammit. You don't need CS, you need to get your shit done.
Re: Poll: Have you moved from JavaScript to CoffeeScript?
#75I have used Javascript exclusively on client and server since late 2008. First Rhino and then Node. Before that I used Rails. I can understand the syntax gripes that some people have towards Javascript but I think this has more to do with a Ruby notion of "elegance" coupled with a lack of familiarity with Javascript then it does with actual issues with Javascript. In fact, I prefer Javascript to Ruby. I have gone the…
Many folks rely on a "forEach" (or "each") iterator for all of their loops over arrays, because it's convenient. Unfortunately, it's also a very slow way to write an inner loop. CoffeeScript's comprehensions expand into regular JS loops over arrays and objects, so you get native speed, without the hassle. This:
for item in list
sum += item.amount
Compiles into this JavaScript: var item, _i, _len;
for (_i = 0, _len = list.length; _i Re: Poll: Have you moved from JavaScript to CoffeeScript?
#76I wan't to be able to debug the code I'm writing in the code I'm writing. The extra layer of sugar seems sickly sweet, nice for a taste but overpowering in bulk.
I think I'm prone to wanting to go lower and seeing how things work in the layer beneath. I'm fascinated by C and assembly languages and how my JS ultimately sits on top of those. I think if CS was interpreted at the same level as JS I'd be more interested.
I guess it really depends on how much you use JS and whether CS makes your work easier. I'm always looking at what complexity I can throw away, I think CS may be just that.
Re: Poll: Have you moved from JavaScript to CoffeeScript?
#77This is going to be a very interesting poll result. Even 5 or 10% penetration is something remarkable, for a language as widely-used as JavaScript. If you feel like providing any more color beyond your vote, your impressions after using CoffeeScript in anger -- I'd love to hear 'em.
The only real problem is that debugging with CoffeeScript adds an extra layer of complexity. I know that this is more or less inevitable, but it is really the only major pain point that I encounter on a day-to-day basis.
Re: Poll: Have you moved from JavaScript to CoffeeScript?
#78Earlier quoted context omitted.
jQuery generally abuses (or takes advantage of, depending on your perspective) the value of "this" in its callback functions, in places where it would really be better to have an explicit argument. For example: AccountView.prototype.render = function() { $(".account").click(function(e) { // `this` is now the same as `e.currentTarget` // But `e.target` is also useful. // And you what you really want is for `this` // t…
@jashkensas what you want though would break the way closures are handled in javascript. What you should do if you still want access to Accountview is to trap a variable with a reference to it in the closure. Using your jquery example: AccountView.prototype.render = function() { $(".account").click( { that: this }, function(e) { // 'that' now holds a reference to AccountView }); }; If you don't want to use (or you ar…
Re: Poll: Have you moved from JavaScript to CoffeeScript?
#79This is going to be a very interesting poll result. Even 5 or 10% penetration is something remarkable, for a language as widely-used as JavaScript. If you feel like providing any more color beyond your vote, your impressions after using CoffeeScript in anger -- I'd love to hear 'em.
Maybe this sounds nitpicky but I'm just not a fan of languages that use indentation to denote block structure. It turns trivial code manipulations into tedious line-by-line exercises. I don't like it in Python or Haskell either. Other than that I see a lot to like in CS though.
Re: Poll: Have you moved from JavaScript to CoffeeScript?
#80CoffeeScript is amazing, I use it for everything including writing native iPhone apps (using titanium). Search for Album Plus in the app store. or visit http://www.albumpl.us/
I checked out your app, very interesting how native it feels. Would you recommend Titanium, in general?
For example, in my app (http://iphone.albumpl.us) I had to write a couple of small custom objective-c modules to get some camera/image stuff to have sufficient performance. But overall being able to write most of it in CoffeeScript, is so much better (enjoyment-wise and speed-wise) than having to write everything in objective-c.