Aaand now your extension can access the hidden data. But that's only possible if closures are transparent. And it might be easier to just mutate the function directly:
(= foo<-body ...)
Incidentally, <- would be ssyntax that lets you easily access an attribute. Thus, the following two would be equivalent:
foo<-bar
(get-attribute foo 'bar)
---
"I think "is there a better way to do this" is a fine logical reason."
Sure, but I don't know of any better ways, nor has anybody presented them, so for now I'm focusing on whether the idea has merit. We can fix the implementation later.
P.S. If you consider this idea to be kludgy, then you probably consider message passing in general to be kludgy. :P How would you like to be able to access the data, then?
---
"But you've gotten me thinking about alternatives :)"
"Extend can't access the hidden data in the closure, but by making functions transparent, you could."
That's a great example, thanks.
"Sure, but I don't know of any better ways, nor has anybody presented them, so for now I'm focusing on whether the idea has merit."
Yeah that makes sense.
In fact, this is a fine implementation. Once I think of it as exposing the compiler's data structures to the language, separating arg lists and body makes a lot of sense.
"In fact, this is a fine implementation. Once I think of it as exposing the compiler's data structures to the language, separating arg lists and body makes a lot of sense."
Well, yeah, how else would you do it? This is low-level stuff. :P