2 research outputs found

    Objects and polymorphism in system programming languages: a new approach

    Get PDF
    A low-level data structure always has a predefined representation which does not fit into an object of traditional object-oriented languages, where explicit type tag denotes its dynamic type. This is the main reason why the advanced features of object-oriented programming cannot be fully used at the lowest level. On the other hand, the hierarchy of low-level data structures is very similar to class-trees, but instead of an explicit tag-field the value of the object determines its dynamic type. Another peculiar requirement in system programming is that some classes have to be polymorphic by-value with their ancestor: objects must fit into the space of a superclass instance. In our paper we show language constructs which enable the system programmer to handle all data structures as objects, and exploit the advantages of object-oriented programming even at the lowest level. Our solution is based on Predicate Dispatching, but adopted to the special needs of system programming. The techniques we show also allow fo r some classes to be polymorphic by-value with their super. We also describe how to implement these features without losing modularity

    Attaching Second-Order Types to Methods in an Object-Oriented Language

    No full text
    This paper proposes an extension of the notion of method as it is currently used in most objectoriented languages. We define polymethods as methods that we can attach directly to types, as opposed to classes and that we can describe with a second-order type. Two benefits result from this extension; first, the expressive power of the language is improved with better modeling abilities. Next, secondorder types yield a more powerful (precise) type inference, which extends the range of static type checking in a truly extensible object-oriented language. We first show that extensible object-oriented languages present many difficulties for static type-checking and that second-order types are necessary to get stronger type-checking. We illustrate how to combine polymethods through type inheritance and propose a technique based on abstract interpretation to derive a second-order type for new polymethods. 1. Introduction Object-oriented languages have two interesting features that distinguish ..
    corecore