Hi Tomas, > > BTW, how can I access existing objects (like "java.lang.System.err") > > in wl? I can only find 'jnew', which creates new objects. > > Like this: > > (jfield `(jclass "java.lang.System") 'err)
I see. Thanks! > Basically, because Java objects are > first class citizens in the wl interpreter, I need very little special The same is the case in ErsatzLisp. > > possibly want to use ErsatzLisp in real applications (e.g. Android > > apps) if I find the time. > > Well, to be pedantic in regards to speed optimisations, whenever you do > something class specific you perform a class lookup based on the class Right. But such calls happen infrequent compared to the execution of the language itself. To make it practically usable, I want the raw Lisp code to run as fast as possible. There I'm not satisfied even with ErsatzLisp, and wl is still another factor slower. > (java "javax.swing.JFrame" T "Animation") > > or > > (interface "java.awt.event.MouseListener" ... > > In wl, there is no need for this because I can do this at read-time, > like the above example: > > `(jclass "java.lang.System") > > Also, I can do it only once, see the 'import' function and how it is > used in swing.l and swt.l. This is also the same in ErsatzLisp. 'interface' returns a Proxy object (as 'java' returns an arbitrary Java object) which can be kept in a variable etc. Cheers, - Alex -- UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe
