3 ms·
Unfortunately, no. At least not with anything resembling R6RS scheme. upvar/uplevel give you dynamic access to the calling context, which is at odds with sche
by saywatnow 10y ago
Unfortunately, no. At least not with anything resembling R6RS scheme. upvar/uplevel give you dynamic access to the calling context, which is at odds with scheme's insistence that compilation must be possible, including the erasure of all names. Tcl is at the other extreme: everything is late-bound, (very nearly) everything is introspectable.
It is possible to go the other way though ... [1] doesn't go as far as macros, but (provided you don't believe in compile-time/run-time separation) upvar/uplevel could take it there!
No call/cc is possible in Tcl, but coroutines can express more limited forms of continuations. And when Oleg calls out call/cc as a poor primitive, I'm comfortable giving it up :).
[1]: https://wiki.tcl.tk/22049 https://wiki.tcl.tk/22049