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

Dylan's type system

   Date: Wed, 30 Sep 1992 18:46:49 +0100
   From: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
   . . .
   2. non-specialized parameters

   It would be nice to be able to specify the type of a parameter without
   incurring the dispatch penalty.  Let's say that a parameter has the
   same type in all the methods for a particular generic-function.  The
   programmer really doesn't want to incur the overhead of specialization
   for this parameter, because the specialization is really only
   performing a kind of type-checking.  Perhaps there could be a flag (or
   maybe sealing a class does this now) for turning off dispatching when
   a parameter has only one specializer (where dispatching is really just
   doing a kind of type-checking anyways).

The issue of whether to do type checking vs. doing "dispatching"
should be relegated to the implementation and perhaps more general
optimization suggestions, and need not be specified in the language.
I can imagine an implementation where this sort of optimization is
performed dynamically and automatically, and furthermore it doesn't
necessarily require that the parameter have the same type in all
methods of the generic function, only in the subset being selected

Glenn S. Burke                | gsb@cambridge.apple.com
Phone: 617/374-5313           | Applelink: GSB

"My running mate took the lead, was the author, of the Job Training
Partnership Act.  Now, because of a lot of smoke and frenzying of
bluefish out there, going after a drop of blood in the water, nobody
knows that."  George Bush, on NBC-TV's Today show, defending his vice
presidential nominee.  Bush also defended his choice of Quayle with,
"There's something very exciting about putting some confidence in
someone in his 30s or 40s."  11/3/88 [Bushisms]