[Pharo-project] jtalk fun
richard.durr at googlemail.com
Fri Apr 22 16:20:34 CEST 2011
On Mon, Apr 18, 2011 at 9:51 AM, Nicolas Petton <petton.nicolas at gmail.com>wrote:
> > me of how this is done in ObjJ).
> Does it look *that* hard?
not the real word, ugly fits better.
> > Another problem is the extension of native JS "types" which can
> > conflict with other libraries as well. I have a feeling that his can
> > be solved by using some form of automatic wrapping like underscore.js
> > uses to extend native JS-Arrays:
> > _(someArray).canCallCoolforEachMethodNow() .
> Yes, but I like the fact that Jtalk maps Smalltalk constructs
> one-to-one with JS equivalents.
Yeah, that is obviously nice but the change would be invisible to the
> > A ST dispatch method
> ) could also swap "undefined" and "null" for nil then automatically.
> However, this would bring a small runtime cost. Switching to a fully
> externalized and decoupled message-send implementation like in ObjJ would
> allow DNU then as well. smalltalkMessageSend(someObject, 'doSomething:',
> That's really interesting. Now, again, I would worry about the runtime
> cost. Jtalk maps message sends to function calls. That's what makes
> Jtalk fast.
In a trivial test I did with Objective J, it did cost about half of the
speed, but gives sending to null and undefined as well als DNU.
Sigh. It would be so cool to have the compatability of CoffeeScript with the
Synta and Functionality of Smalltalk without having to write JS.^^
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-project