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

Typing in object-oriented languages




[------ The Types Forum ------- http://www.dcs.gla.ac.uk/~types ------]


I would like to announce the availability of the following paper:

                Typing in object-oriented languages: 
                 Achieving expressibility and safety

                               by 
                          Kim B. Bruce
                        Williams College

                            ABSTRACT

While simple static-typing disciplines exist for object-oriented
languages like C++, Object Pascal, and Modula-3, they are often so 
restrictive that programmers are forced to by-pass the type 
system with type casts.  Other languages allow more freedom, but require 
run-time checking to pick up the type errors that their more permissive 
systems missed.

This paper consists of a survey of problems (illustrated by a series
of sample programs) with existing type systems, and suggests ways of improving
the expressibility of these systems while retaining static type safety.  
In particular we will discuss the motivations behind introducing "MyType",
"matching", and "bounded matching" into these type systems.

We also suggest a way of simplifying the resulting type system by replacing
subtyping by a type system with a new type construct based on matching.
Both systems provide support for binary methods, which are often difficult
to support in statically-typed languages.

The intent is to avoid pages of type-checking rules and formal proofs, but
instead explain why the problems are interesting via the series of sample
programs.  The technical details (including proofs of subject reduction and 
type safety) are available elsewhere.

-----------------------------
This paper is available either by following links from my home page:

	http://www.cs.williams.edu/~kim/

or by anonymous ftp at cs.williams.edu in pub/kim/Static.{dvi,ps}

Comments are welcomed.  

(An earlier draft version of this paper available on the net was entitled:
"Problems with static typing in object-oriented languages".  Please discard
any copies of the earlier version.)