Object-Oriented Programming A Unified Foundation, 1st by Giuseppe Castagna (auth.)

By Giuseppe Castagna (auth.)

by Luea Cardelli Ever because Strachey's paintings within the 1960's, polymorphism has been categorized into the parametric and overloading forms. Parametric polymorphism has been the topic of intensive examine for over 20 years. Overloading, nonetheless, has frequently been thought of too advert hoc to deserve a lot cognizance although it has been, in a few shape, an element of just about each programming lan­ guage (much extra so than parametric polymorphism). With the creation of object-oriented languages, and specifically with multiple-dispatch object-oriented languages, overloading has develop into much less of a programming comfort and extra of a primary characteristic short of right clarification. This publication presents a compelling framework for the examine of run-time over­ loading and of its interactions with subtyping and with parametric polymorphism. The ebook additionally describes functions to object-oriented programming. This new framework is prompted by means of the really fresh unfold of programming languages which are completely in line with run-time overloading; this truth most likely explains why this topic was once now not investigated previous. as soon as appropriately understood, overloading unearths itself suitable additionally to the learn of older and extra traditional (single­ dispatch) object-oriented languages, clarifying gentle problems with covariance and contravariance of process varieties, and of run-time kind research. within the ultimate chapters, a synthesis is made among parametric and overloading polymorphism.

Show description

Read or Download Object-Oriented Programming A Unified Foundation, 1st Edition PDF

Similar object-oriented design books

Building Java Enterprise Systems with J2EE

The sensible perspective of creating Java company structures with J2EE presents the conceptual historical past and wealth of code examples had to truly gather structures in an invaluable demeanour with the J2EE applied sciences. moreover, this e-book demonstrates how the applied sciences supplement and construct on most sensible of each other through evolution of a cohesive and genuine pattern program.

Beginning Perl (Expert's Voice in Open Source)

It is a e-book for these people who believed that we didn’t have to research Perl, and now we all know it truly is extra ubiquitous than ever. Perl is intensely versatile and strong, and it isn’t scared of internet 2. zero or the cloud. initially touted because the duct tape of the net, Perl has due to the fact that advanced right into a multipurpose, multiplatform language current totally all over the place: heavy-duty net purposes, the cloud, structures management, traditional language processing, and monetary engineering.

Developing Modular-Oriented Simulation Models Using System Dynamics Libraries (SpringerBriefs in Electrical and Computer Engineering)

This SpringerBrief introduces the improvement and functional program of a module-oriented improvement framework for area particular system-dynamic libraries (SDL approach), which are utilized in the simulation of multi-causal and dynamic relationships on assorted degrees of an undefined, as an instance the development undefined.

Additional resources for Object-Oriented Programming A Unified Foundation, 1st Edition

Sample text

16 Chapter 1. Background and notation Soundness of the type system From the perspective of this book the most important theorem is the one that ensures the soundness of the type system (with respect to the reduction). Soundness is obtained by showing that every well-typed term cannot be reduced except into another well-typed term. In this way the computation of a well-typed term cannot generate a type error. This property is called subject reduction. Remark (Weakening) If r I- M: T is provable and y is not in the domain of r, then r, (y: S) I- M: T is provable.

P'; but from the induction hypothesis it follows that N is well-typed and the type of the codomain of N is less than or equal to the one of M; since the domains are the same, the result is proven. MI ·M2 where r f-d MI:V -+ T and rf-d M2:W:::; V. We have three sub- cases: 1. MI [> M~ , then by the induction hypothesis r f- d M~: U -+ S with V:::; U and S:::; T. Since W :::; V :::; u, then by rule [-+ELIM($)] we obtain r f- d M~M2:S:::; T. [> M2 ' then by the induction hypothesis r f- d M 2: W' with W' :::; W.

1. Introduction 39 and other features have led to uneasy extensions of this model. In this book we study the second approach, based on overloaded functions. We show that this approach has several advantages. It captures some mechanisms that are not modeled by records, and it shows how to improve them. This approach induces a new view of object-oriented programming, one that suggests new constructions to be integrated in the object-oriented paradigms. Furthermore, this change of perspective clarifies the use of some features, like covariance and contravariance in subtyping (topic of a heated debate: see Chapter 5) that have been so far unclear.

Download PDF sample

Rated 4.57 of 5 – based on 46 votes