[self-interest] Re: Grammar changes - comments?
Stefan Matthias Aust
sma at netsurf.de
Wed Sep 1 20:21:41 UTC 1999
>Has anyone considered supporting this syntax in one of the new Self clones?
For mySelf, I'd like to define the VM layer and then unrelated to it (if
that's possible) the mySelf language layer. There're probably a few
connection points, but hopefully few enough to easily allow to change the
>It would also make automatic translation of Java(or Python, etc.) code
>to Self code a bit easier.
Why would you like to do such a translation?
Instead, I'd like to interface at least Java code. At the moment, my plan
is to do a mySelf prototype in Java. My goal (just a little goal, I know)
is to be able to interface with Swing to allow a Swing GUI to call back
mySelf objects for ActionListeners etc.
In theory, it should be possible to interface any existing Java class
library. Unfortunately, this is just a plan right now as my time only
permits a few hours of work every weekend.
Some along the lines
| f b |
f: java awt JPanel new.
b: java awt JButton new: ('click me').
b addActionListener: [| :ev | "..."] asActionListener.
f add: b.
would be really cool IMHO. While I've already a rough idea how to
implement the normal java class and java instance objects, I'm still unsure
how to do the callback. The 'asActionListener' would do the ugly work to
setup some Java adapter class which known how to forward an
actionPerformed() to the Self block object.
Stefan Matthias Aust // Bevor wir fallen, fallen wir lieber auf.
More information about the Self-interest