bugKawa - Bugs: bug #36596, fluid-let IllegalAccessException

 
 

bug #36596: fluid-let IllegalAccessException

Submitter:  Charles Turner <charlest>
Submitted:  Tue 05 Jun 2012 10:02:35 PM UTC
   
 
Category:  Scheme language Severity:  3 - Normal
Item Group:  Run-time exception Status:  Postponed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 01 Nov 2016 05:20:38 PM UTC, comment #3: 

Right, but you can't "temporarily change" an immutable variable.

Though you could argue that in standard Scheme the definition of myfun isn't inherently immutable.

This gets into the tricky area of lexical scope vs dynamic environment.  Fluid-let lives in the messy intersection between them.  One day I may look at it more closely.

I guess "Postponed" is more appropriate Status.

Per Bothner <bothner>
Group administrator
Tue 01 Nov 2016 04:46:54 PM UTC, comment #2: 

Been a while :) -- but what I remember of fluid-let is that it should temporarily change the variable's binding within it's extent, and restore the original binding when the scope is closed.

So I /think/ I expected this to return 'inner.

Charles Turner <charlest>
Tue 01 Nov 2016 03:51:18 PM UTC, comment #1: 

I don't think this makes sense - though how dynamic variables interact with top-level (module-level) variables is a bit murky.

It probably should have a compile-time warning, at least.

Per Bothner <bothner>
Group administrator
Tue 05 Jun 2012 10:02:35 PM UTC, original submission:  

From Kawa v1.12


$ java -cp kawa-1.12.jar kawa.repl
#|kawa:1|# (define (myfun) 'outer)
#|kawa:2|# (fluid-let ((myfun (lambda () 'inner))) (myfun))
java.lang.IllegalAccessException: Can not set static final gnu.expr.ModuleMethod field atInteractiveLevel$1.myfun to gnu.expr.ModuleMethod
..


Charles Turner <charlest>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  • -email is unavailable- added by charlest (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-01 bothner StatusInvalid Postponed
    2016-11-01 bothner StatusNone Invalid
        Assigned toNone bothner

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code