You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clojure-py-dev
I was trying to understand how the whole business of closures/aliases was resolved in compileFN when I noticed something wrong: the alias-resolving algorithm only ever goes forward, i.e. a new code object can only resolve aliases that had been defined before. So the following (valid) code fails:
(letfn [(f [] (g)) (g [] nil)])
And of course it's not just an ordering problem -- you have to be able to define mutually recursive functions as well.
It seems like this will require quite some work at the level of compileFN. A quick check tells me that clojure-jvm falls back on a letfn* special form that is implemented in java. Urgh.