Dear all, 

          (Fergus Anderson writing)
> On first impression, having just read the paper "Type restrictions for
> overloading, without restrictions, declarations or annotations",
> I don't think I like system CT very much, because I think declaring
> interfaces is very important for software engineering reasons.
> Experience with C++ has shown that that the lack of declared interfaces
> with C++ templates causes major problems.  At first impression, it seems
> to me that a language based on system CT will suffer from the same kinds
> of problems.

          (Kevin Atkinson writing)
> And I agree.  I propose extending the CT system to allow constraints
> to be made on how a function can be overloaded.  Functions will
> still be allowed to be overloaded in other ways, but only by
> explicitly stating that this function violates the rule.  These
> constraints for all intends and purposed will act like type classes.
> -

I must clarify. 

Our paper provides a type inference algorithm for a polymorphic
core-language, just as core-ML/core-Haskell, **that also supports
overloading**. That is all. It does not define a programming
language. Just as with SML or Haskell, a language *based* on System CT
could declare interfaces, and, clearly, types may be declared and
annotated, for any desired purpose. As in SML or Haskell, types are
infered but type annotations are not forbidden. Of course, as in these
languages, if a type annotation disagrees with the inferred type, a
type error occurs.

In our view, System CT is a step towards a language with
*polymorphism*, *type inference* and *unrestrictive overloading*.

Type classes (and other type annotations) would not be *needed* in
such a language (as types would be infered), but type annotations
could be written, specially for specifying module interfaces and for
documentation purposes.

Kind regards,

Carlos


Reply via email to