[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weirdness in Dylan spec



I've looked over the Dylan spec pretty throughly and for the most part
I am quite pleased.  So far there is only one thing that has really
caught my eye as a potential bug.  In the specification of
'define-generic-function' it says:

"If [the current symbol binding] contains a generic function, the
definition of the generic function must be consistent with the call
to 'define-generic-function', or and error is signaled"

This implies to me that typing:

(define-generic-function foo (x) ...)
(define-generic-function foo (x y) ...)

will generate an error.  I would expect this to just redefine 'foo'
possibly with a *warning*.  So how do I redefine 'foo' short of
restarting the entire system?  I looked around and there is no
'unintern' analog at all.  This concerns me because I would be very
unhappy to have a supposedly 'dynamic' language that requires me to
restart the entire system everytime I wish to modify the argument
list a generic function.  Am I missing something?  Is this just
a rough edge in the spec?  Or is there some deep reason for this
seemingly broken behavior?

Finally, could someone comment on why eval is so expensive?  It seems
seems to me that eval is essentially just a combination of a
hash-table lookup and apply.  If desired the size of the hash-table
could be constrained with a variant of Dylan's sealing concept applied
to modules.

Nathan Wilson