Batman.js vs Knockout.js
blog.erlware.org
Batman.js vs Knockout.js
1–7 of 7 posts
Re: Batman.js vs Knockout.js
#2In all these frameworks that add those features, they forgot to copy two that I personally love to death. data bind attributes can contain arbitrary javascript, and creating new types of data bindings is insanely trivial.
Re: Batman.js vs Knockout.js
#3 this.User = ...
but what use does it have?Re: Batman.js vs Knockout.js
#4sorry for being a n00b but what's the goal of the "class @User" syntax? I have a cursory knowledge of CS and I'd assume that gets desugared to something like this.User = ... but what use does it have?
Re: Batman.js vs Knockout.js
#5sorry for being a n00b but what's the goal of the "class @User" syntax? I have a cursory knowledge of CS and I'd assume that gets desugared to something like this.User = ... but what use does it have?
Re: Batman.js vs Knockout.js
#6sorry for being a n00b but what's the goal of the "class @User" syntax? I have a cursory knowledge of CS and I'd assume that gets desugared to something like this.User = ... but what use does it have?
CoffeeScript wraps its output in an anonymous function, so to create a global var you have to explicitly assign it as "window.varname" or, at the top level, "this.varname".
Re: Batman.js vs Knockout.js
#7sorry for being a n00b but what's the goal of the "class @User" syntax? I have a cursory knowledge of CS and I'd assume that gets desugared to something like this.User = ... but what use does it have?
class User
it would compile to: (function() {
User = (function() {
function User() {}
return User;
})();
}).call(this);
while class @User
would compile to: (function() {
this.User = (function() {
function User() {}
return User;
})();
}).call(this);
ensuring that User is available from any file (since the top-level this === window in the browser).