[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Strong Typing, Dynamic Languages, What to do?
Alex Peake writes:
> Forgive my ignorance - I am just an application developer not a language
> expert - but..
>
> does not Common Lisp give much of the "typing option" that offers the
> "graceful transition" you refer to? For example, there are multi-methods
> where you can use:
> (defmethod (do-it ((arg1 float) (arg2 float)) body...)
> (and even define a version to capture all other types and throw an error)
Not to be too nit-picky, but multimethod specializers aren't the same
thing as type annotations, although perhaps CLOS treats them the
same-- I think Dylan does too? I know that in Cecil and MultiJava,
you can have one or the other or both-- they are pretty much
orthogonal (although your specializers ought to be subtypes of your
type annotations).
--dougo@ccs.neu.edu