This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Fluid-let not so fluid with java-typed variable
- To: kawa at sources dot redhat dot com
- Subject: Fluid-let not so fluid with java-typed variable
- From: Emmanuel Castro <castro at lirmm dot fr>
- Date: Wed, 14 Feb 2001 12:50:56 +0100
I java-type some variable to make their use with (invoke ..) is
efficiently compiled,
but I notice a feature with fluid-let that makes it not so fluid when
used with java-typed
variable
Consider the following code :
;;;;
(define z :: <java.awt.Point> (make <java.awt.Point>))
(define (Z) (invoke z 'getX))
(define (W)
(fluid-let ((z (make <java.awt.Point> 52 52)))
(Z)))
;;;;
When compiled and loaded with (require ...), (Z) return 0.0 (that's ok),
with (W) return 0.0 too (not fluid).
It is solved if you type (define z (make ...)) instead of (define z ::
<java.awt.Point> (make ...)) or
if you type
(fluid-let ((z (make <java.awt.Point> 52 52))) ;; you loose (invoke...)
optimisation
instead of
(fluid-let ((z :: <java.awt.Point> (make <java.awt.Point> 52 52)))
It seems that the later cannot be evaluated properly in non compiled
mode