Closed ivan4th closed 9 years ago
Nice work! I learned about progv
reading through the changes, had never heard of it before.
it no longer can detect whether the callback was already added
I don't think this is an issue at all. In fact I just removed the duplicate checking callback/errback code/docs because I don't see the purpose of checking if it was already added (and maybe there are cases where you'd want to fire the same callback twicr).
I thought about making alet/alet* bindings of special vars work in such way that these vars are auto-registered in promise-keep-specials while executing any code related to that alet/alet* form
Interesting, would it auto-detect var names wrapped in *
or would it add all the bound variables to the *promise-keep-specials*
collection? Or maybe I'm misunderstanding what you were thinking here.
Thanks for the update!
Concerning progv
- actually it was @archimag who told me about it after I showed him the preliminary version of special var keeping code, although I knew about it in the past I managed to forget it. He's currently integrating his RESTAS web framework with wookie. progv
can also be used to make REPL integration code somewhat prettier (BTW: today I've noticed that SLIME broke eval hooks back in September, wrote a pull request to fix it which is already accepted).
As of let - yes, perhaps *
-wrapping needs to be looked at there to detect special vars. I thought that this is rather dirty hack and thus decided not to do it for now.
Sometimes it's desirable to keep some kind of context available via special vars during execution of a promise chain. For instance one may want to keep http request related context while serving a request in a web app. I added promise-keep-specials special var that can be used for such purposes:
Several notes: