<br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><span class="q"><blockquote type="cite"><div>so why isn't there a 'subject' for contextl? not that i ever missed it, i'm just curious. and because of this feel free to send a short answer... :)
<br></div></blockquote><div><br></div></span><div>It took me some time to understand this as well. I have thought about a way to integrate subjects in CLOS, but I couldn't find a good way for doing this. I think that I never had even a rough idea how to approach this. The reason, however, is very clear once you think about this:
</div><div><br></div><div>In CLOS, there are no message receivers, in the Smalltalk/Java sense where messages are sent to objects. CLOS is based on generic functions where each argument can contribute to method selection. This means at the same time that in CLOS, there is no "natural" sender of a message: The only natural caller of a generic function is the generic function that contains that call. None of its arguments can be considered a good subject (maybe the first argument according to argument precedence order, but that's too arbitrary for my taste).
</div><div><br></div><div>If you think harder about this, I think you can note that Common Lisp already has a (functional equivalent of a) possible sender representation: Dynamically scoped special variables can play that role. If you want to indicate to a function that it has been called from a certain context / from a certain subject, just bind a special variable to the information that represents that context / subject, and then the function can inspect it. If you additionally want the context to influence method dispatch - well, that's what ContextL does. ;)
</div><div><br></div><div>This is all speculation, so take this with a grain of salt. It's certainly possible that I haven't gotten this right yet. We are still in an early stage of understanding our intuitions about context-oriented programming...
</div></div></div></blockquote><div><br>as i understand subjects in slate they are a way for the user to override very specific situations. just think of the subject being an implicit last argument in a message send: with multiple dispatch this means that you can override one single signature by specializing on the last implicit arg (the subject), whereas with layers (first implicit arg) you can override an entire bunch of methods.
<br><br>both subject and layer are two contextual objects, but they can hook up on MD in different ways.<br><br></div>i hope i'm making sense with this,<br><br></div>- attila<br><br>PS: i've just pushed ContextL integration for 
<a href="http://common-lisp.net/project/defclass-star/">defclass-star</a> by defining a deflayer*<br>