From: Pascal Bourguignon
Subject: Re: defgeneric, defstruct and no CLOS
Date: 
Message-ID: <871x1yn7l1.fsf@thalassa.informatimago.com>
verec <·····@mac.com> writes:
> [...]
> (draw conclusion)
> (draw bank-account)
> (draw shape)
>
> I kind of sense that in CL parlance this all what a "generic function"
> is about. Where I start to get confused is when the CLHS starts
> talking about ``objects'' according to which the appropriate method
> of the generic function is selected.
> [...]
> My real goal, at this stage, is to start defining my data structures using
> defstruct, and be able to define "context free" names for functions, which,
> when "specialized" for a given "type" (as far as defstruct defines types)
> will resolve to the correct body of code.
> [...]

Ok, by now it should be clear that the generic function model is not
meant to do that.  You've got the choice between using the generic
function model for what it is designed, or to go on with inventing a
new language. 

Why should you limit your syntax to one word prefix?

You could want to write ambiguous sentences such as:

    (get a dictionary dict from the file "dict.data")
    (get the interface eth0 up)
    (get the element x out of list)
    (get the table get the association (:name "Pascal") by heart)

You'd just need to write some nlp layer over CL to compile these
statements to unambiguous low-level lisp code.

No kidding.  
Just have a look at the LOOP macro which does quite the same thing.


-- 
"Debugging?  Klingons do not debug! Our software does not coddle the
weak."