[closer-devel] Adding dynamic-wind to ContextL

Pascal Costanza pc at p-cos.net
Thu Nov 12 09:39:12 UTC 2009


On 12 Nov 2009, at 09:09, Tobias C. Rittweiler wrote:

> Pascal Costanza <pc at p-cos.net> wrote a year ago:
> 
>> [.. adding dynamic-wind ..]
> 
> As far as I can see, that stuff is orthogonal to ContextL. How
> standalone is the code? (I have the need for temporarily tearing down
> and later reestablishing dynamic context like mutex state, and I could
> possibly make use of your work in that respect.)

There are two ways how to interpret your question:

+ Do you mean "Can dynamic-wind & co be used independent of the other features of ContextL?" The answer is a clear yes: You don't have to buy into layered classes, layered functions and all that other layered stuff just to use dynamic-wind. So you can just go ahead and use it.


+ Do you mean "Can I provide dynamic-wind as a separate library, without adding all that layered stuff in the same library as well?" I think I potentially could, but I'm hesitating to do so. Library granularity is a problematic thing: If you make your libraries too small, you create lots of dependencies that people somehow have to manage (including the maintainers of the library, but also users of the library). If you create them too large, users load a lot of code into their application that they ultimately don't need.

I have already got complaints in the past that I had too many dependencies (that's why I removed the lw-compat from Closer to MOP library, for example). So: Is it really worthwhile to separate out dynamic-wind? Does it hurt so much to load the rest of ContextL even if you don't need it?

I could of course also use more code conditionalization, so that you could remove layered stuff on demand. Would that help?


+ Do you mean "Can I separate out the code easily myself?" [1] Yes, that should be possible: You want cx-dynamic-environments.lisp and probably also cx-dynamic-variables.lisp.


Pascal

[1] "Three ways to interpret your questions, there are three ways to interpret your questions. Amongst our interpretations are such diverse elements as: ..."

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel
Software Languages Lab
Pleinlaan 2, B-1050 Brussel, Belgium












More information about the closer-devel mailing list