Join us on:
Facebook
LinkedIn
Plaxo

Language Design

Session Chair: Gary T. Leavens, University of Central Florida
Flapjax: A Programming Language for Ajax Applications
Leo Meyerovich, University of California, Berkeley
Arjun Guha, Brown University
Jacob Baskin, Google
Gregory H. Cooper, Google
Michael Greenberg, University of Pennsylvania
Aleks Bromfield, Brown University
Shriram Krishnamurthi, Brown University

This paper presents Flapjax, a language designed for contemporary Web applications. These applications communicate with servers and have rich, interactive interfaces. Flapjax provides two key features that simplify writing these applications. First, it provides event streams, a uniform abstraction for communication within a program as well as with external Web services. Second, the language itself is reactive: it automatically tracks data dependencies and propagates updates along those dataflows. This allows developers to write reactive interfaces in a declarative and compositional style.

Flapjax is built on top of JavaScript. It runs on unmodified browsers and readily interoperates with existing JavaScript code. It is usable as either a programming language (that is compiled to JavaScript) or as a JavaScript library, and is designed for both uses. This paper presents the language, its design decisions, and illustrative examples drawn from several working Flapjax applications.

CZ: Multiple Inheritance without Diamonds
Donna Malayeri, Carnegie Mellon University
Jonathan Aldrich, Carnegie Mellon University

Multiple inheritance has long been plagued with the "diamond" inheritance problem, leading to solutions that restrict expressiveness, such as mixins and traits. Instead, we address the diamond problem directly, considering two difficulties it causes: ensuring a correct semantics for object initializers, and typechecking multiple dispatch in a modular fashion—the latter problem arising even with multiple interface inheritance. We show that previous solutions to these problems are either unsatisfactory or cumbersome, and suggest a novel approach: supporting multiple inheritance but forbidding diamond inheritance. Expressiveness is retained through two features: a "requires" construct that provides a form of subtyping without inheritance (inspired by Scala, and a dynamically-dispatched "super" call similar to that found in traits. Through examples, we illustrate that inheritance diamonds can be eliminated via a combination of "requires" and ordinary inheritance. We provide a sound formal model for our language and demonstrate its modularity and expressiveness.

Empirical Assessment of Object-Oriented Implementations with Multiple Inheritance and Static Typing
Roland Ducournau, LIRMM - Université Montpellier 2, CNRS
Floréal Morandat, LIRMM - Université Montpellier 2, CNRS
Jean Privat, Université du Québec à Montréal

Object-oriented languages involve a trade-off between three aspects, namely multiple inheritance, runtime efficiency and open world assumption (OWA), i.e. dynamic loading. The runtime efficiency of object-oriented programs is conditioned by the underlying implementation technique and compilation scheme. The former is concerned by the precise data structures that support basic object-oriented mechanisms (namely method invocation, attribute access and subtype testing). The latter consists of the production line of an executable program from the source code files, including compilers, linkers, loaders, virtual machines and so on. Many implementation techniques have been proposed and several compilation schemes can be considered from fully global compilation, under the closed-world assumption, to fully separate compilation, with dynamic loading, under the OWA, with midway solutions that involve separate compilation and global linking. In this article, we review a significant subset of all possible combinations and present a systematic empirical comparison of their respective efficiency with all other things being equal. The testbed consists of the PRM compiler that has been designed to implement various alternative techniques, in different compilation schemes. The considered techniques include C++ subobjects, coloring, perfect hashing and binary tree dispatch. A variety of processors have been considered. Qualitatively, these first results confirm the intuitive or theoretical abstract assessments of the tested approaches—as expected, efficiency increases as CWA strengthens. From a quantitative standpoint, the results are the first to precisely compare the efficiency of techniques that are closely associated with languages, e.g. C++ and EIFFEL. They also confirm that perfect hashing should be used for implementing JAVA interfaces.

Please email any questions to . This e-mail address is being protected from spambots. You need JavaScript enabled to view it