Re: [pro] Modularity for subclassing in Common Lisp

2010-12-01 Thread Daniel Herring
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 "public", "protected", > and "private". Whatever else you say

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-01 Thread Faré
> 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. > You can have that in Lisp to a point with Interface-Passing Style: http://fare.livejournal.com/155094.html

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-01 Thread Daniel Weinreb
Faré wrote: On 1 December 2010 10:25, Daniel Weinreb wrote: Here is a way that CL sucks badly: protocols are not first-class entities. To modify a protocol is something done to the source code *outside* of the Lisp world. It cannot be done programmatically. Adherence to the protocol cannot

Re: [pro] Modularity for subclassing in Common Lisp

2010-12-01 Thread Faré
On 1 December 2010 10: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. > Here is a way that CL sucks badly: protocols are not first-class

[pro] Modularity for subclassing in Common Lisp

2010-12-01 Thread Daniel Weinreb
(This is a new topic.) Many times, people have presented a major problem with object-oriented programming as it is often/idiomatically used. The good thing is that OOP, when done right (in Lisp, that means, among other things, always using defgeneric explicitly), provides a great abstarct interfa

Re: [pro] When to use SLOT-VALUE...

2010-12-01 Thread Daniel Weinreb
You considered the idea that when you write a library (internal module, whatever) that defines a new type of Lisp object, it should not necessarily be apparent to the caller whether the implementation of objects of that type happen to use CLOS. Hans: Of course, one may want to argue that DEFCL

Re: [pro] When to use SLOT-VALUE...

2010-12-01 Thread Daniel Weinreb
Sorry for the delay; here are my comments. Meta-point: I prefer to work out these issues by first disregarding speed issues, and figuring out what the best semantics is. Then, later, if there is real need for speedup, we can do that, but keep in place the original intention of the code, for the