4 ms·
Not sure what you mean by Objective-J being too far out. Objective-J is much closer and "interoperable" with JS than CoffeeScript because it is a strict superse
by tolmasky 16y ago
Not sure what you mean by Objective-J being too far out. Objective-J is much closer and "interoperable" with JS than CoffeeScript because it is a strict superset of JavaScript (in other words, all JavaScript is also Objective-J). Practically what this means is that any existing JS works alongside Objective-J with no changes whatsoever, the syntaxes do not "collide". The difference between ObjJ and JS are comparable to ECMAScript 2 and 5 (additions of new features and keywords)
- jashkenas 16y agoNot to be combative, but I think what he means is this: Although it's perfectly easy to use JavaScript from Objective-J, the same is not true in reverse. ObjJ generates code that looks like this: objj_msgSend(objj_msgSend(CPIndexSet,"alloc"), "initWithIndexSet:",_selectedRowIndexes); ... where objj_msgSend is how the Objective-J "interpreter" does it's magic. If I wanted to use a library that was originally written in Objective-J, from JavaScript, I'd have a hell of a hard time calling it correctly, unless the library author took special care to make it JavaScript-compatible in the first place. The syntaxes may not collide, but the semantics certainly don't match up. On the other hand, you'd never know that you were calling a CoffeeScript library from JS, unless you inspected the source, and vice-versa. In that sense, they're interoperable.
- tolmasky 16y agoNo not combative at all, what you say makes perfect sense. I suppose the confusion arose because he bundled objj with gwt, saying you'd need a totally different jquery, which is certainly not the case with objj.