Hi Samuel,

> # Java Import, now with interface instantiation, class and package symbols

Cool! Great stuff. Thanks for the examples!


> # Java, Plus! : Fixed an issue with the Classes list, where some of the
> classes are not chain-ed. It seems that (link Class) sometimes loses its
> value if (chain (arrayAsList (java Class "getInterfaces") ) ) is done,
> instead of (mapcar 'link (arrayAsList (java Class "getInterfaces") ) ).
> This happened when javaPlus is used on an instance of
> java.util.concurrent.TimeUnit (e.g. TimeUnit.MINUTES), apparently because
> said instance's is in fact a subclass of TimeUnit, which caused said
> Class-collecting code to go wibbly-wobbly.
> # Is the aforementioned behavior consistent with the PicoLisp spec?

Hmm, this kind of worries me. What exactly goes wrong? Perhaps a bug in
ErsatzLisp?

Note that 'mapcar' is not optimal here, because it builds a list which
is immediately garbage. 'mapc' is better.

But except for that,

   (chain Lst)

should be the same as

   (mapc link Lst)

or

   (apply link Lst)

as long as 'Lst' may be destructively operated on (which is the case in
your example, as the list is freshly built in 'arrayAsList').

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to