News for hackers. Stuff that matters.
Re:Announcing Backbone.js: Models, Collections and Views in ... by boothead on Thursday October 14, 2010 @06:31AM (#1790446)
Awesome! Any plans to integrate this with coffeescript? I see someone's already taken a stab at it: http://gist.github.com/625893
Re:Announcing Backbone.js: Models, Collections and Views in ... by jashkenas on Thursday October 14, 2010 @07:17AM (#1790512)
It's just JavaScript, so they should work together fine:

    Todo = Backbone.Model.extend
      
      done: ->
        @get("status") is "done"

      toggle: ->
        @set status: if @done() then "active" else "done"
Doing a quick Backbone.coffee version would be fun though, hmm...
Re:Announcing Backbone.js: Models, Collections and Views in ... by boothead on Thursday October 14, 2010 @07:20AM (#1790518)
TBH I was a little surprised that you didn't write this in coffee in the first place :-)

Isn't this the kind of thing that coffee would be aimed at?

Re:Announcing Backbone.js: Models, Collections and Views in ... by jashkenas on Thursday October 14, 2010 @08:57AM (#1790711)
Yes, and the CoffeeScript version would probably perform marginally faster. But pragmatism comes first. Because this is a part of a grant-funded project, it needs to be available and accessible to the widest possible audience -- and that means JavaScript.