Re: [pro] Modularity for subclassing in Common Lisp

2010-12-07 Thread Matthew D. Swank
On 12/07/2010 09:19 PM, Faré wrote: > A better question might be > how do you enforce disjointness of some mixins. I suppose a > heavy-handed use of MOP magic could do it, but oh well. Q: Doctor, it hurts when I do this. A: Well, don't do that. In the examples I looked at that inspired me to use I

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-07 Thread Faré
On 7 December 2010 14:00, Pascal Costanza wrote: > On 1 Dec 2010, at 18:16, Faré wrote: > The term 'mixins' sets of my alarm bells. ;) But first a question, to better > understand what you mean here: How do you reconcile the notion of mixins with > multiple dispatch? > I don't know that there's

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-07 Thread Pascal Costanza
On 1 Dec 2010, at 18:16, Faré wrote: > On 1 December 2010 10:25, Daniel Weinreb wrote: >> First, a common base class can provide implementations of some of the >> generic functions all by itself. My favorite simple example is an >> "output stream" protocol, that has a write-character operation

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-07 Thread Pascal Costanza
On 1 Dec 2010, at 21:16, Daniel Weinreb wrote: > I have always liked the idea of having protocols > say more than just "these are the functions > and these are the arguments, which are optional, > ane maybe what their types are. I'd love it > if there were a way to say "in order to fulfill > thi

Re: [pro] (values) for for-effect functions

2010-12-07 Thread Pascal Costanza
Yes. On 7 Dec 2010, at 19:36, Peter Seibel wrote: > You mean PCL the CLOS implementation, right? > > -Peter > > On Tue, Dec 7, 2010 at 10:20 AM, Pascal Costanza wrote: >> >> On 3 Dec 2010, at 13:34, Martin Simmons wrote: >> >>> I think it is confusing to use (values) for that purpose, becaus

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-07 Thread Pascal Costanza
On 1 Dec 2010, at 16:25, Daniel Weinreb wrote: > I call the set of defgenerics (plus the factory functions) the > "protocol". The word "type" is sort of right but carries a lot of > connotations and freight that I'd rather avoid. In the Haskell community, these beasts are called 'type classes'.

Re: [pro] (values) for for-effect functions

2010-12-07 Thread Peter Seibel
You mean PCL the CLOS implementation, right? -Peter On Tue, Dec 7, 2010 at 10:20 AM, Pascal Costanza wrote: > > On 3 Dec 2010, at 13:34, Martin Simmons wrote: > >> I think it is confusing to use (values) for that purpose, because "no values" >> is also a valid return value (e.g. for reader macro

Re: [pro] (values) for for-effect functions

2010-12-07 Thread Pascal Costanza
On 3 Dec 2010, at 13:34, Martin Simmons wrote: > I think it is confusing to use (values) for that purpose, because "no values" > is also a valid return value (e.g. for reader macro functions > http://www.lispworks.com/documentation/HyperSpec/Body/02_add.htm). > > I would make it a macro, called

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-07 Thread Michael Forster
On Wed, Dec 1, 2010 at 8:29 PM, Daniel Herring wrote: > On Wed, 1 Dec 2010, Daniel Weinreb wrote: > >> Smalltalk didn't even try.  CLOS, I believe, does not try and there is >> not an idiomatic way to do it.  The only language I know that makes a >> good stab in this direction is C++, which has "p