scholarly journals Transitioning from structural to nominal code with efficient gradual typing

2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-29
Author(s):  
Fabian Muehlboeck ◽  
Ross Tate

Gradual typing is a principled means for mixing typed and untyped code. But typed and untyped code often exhibit different programming patterns. There is already substantial research investigating gradually giving types to code exhibiting typical untyped patterns, and some research investigating gradually removing types from code exhibiting typical typed patterns. This paper investigates how to extend these established gradual-typing concepts to give formal guarantees not only about how to change types as code evolves but also about how to change such programming patterns as well. In particular, we explore mixing untyped "structural" code with typed "nominal" code in an object-oriented language. But whereas previous work only allowed "nominal" objects to be treated as "structural" objects, we also allow "structural" objects to dynamically acquire certain nominal types, namely interfaces. We present a calculus that supports such "cross-paradigm" code migration and interoperation in a manner satisfying both the static and dynamic gradual guarantees, and demonstrate that the calculus can be implemented efficiently.

Author(s):  
Tran Thanh Luong ◽  
Le My Canh

JavaScript has become more and more popular in recent years because its wealthy features as being dynamic, interpreted and object-oriented with first-class functions. Furthermore, JavaScript is designed with event-driven and I/O non-blocking model that boosts the performance of overall application especially in the case of Node.js. To take advantage of these characteristics, many design patterns that implement asynchronous programming for JavaScript were proposed. However, choosing a right pattern and implementing a good asynchronous source code is a challenge and thus easily lead into less robust application and low quality source code. Extended from our previous works on exception handling code smells in JavaScript and exception handling code smells in JavaScript asynchronous programming with promise, this research aims at studying the impact of three JavaScript asynchronous programming patterns on quality of source code and application.


Author(s):  
Fuensanta Medina-Domínguez ◽  
Maria-Isabel Sanchez-Segura ◽  
Antonio de Amescua ◽  
Arturo Mora-Soto

In the mid 1960’s, the architect Christopher Alexander (1964) came up with the idea of Patterns, as “a solution to a problem within a defined context” and developed this concept. He explains, in a very original way, his ideas of urban planning and building architecture, using patterns to explain the “what”, “when”, and “how” of a design. Alexander invented a Pattern Language that is the fundamental to good building and city designs, and describes it in a collection of repetitive schemas called patterns. In Computer Science, software is susceptible to conceptual patterns. Consequently, Ward Cunningham and Kent Beck, used Alexander’s idea to develop a programming pattern language composed of five patterns as an initiation guide for Smalltalk programming. This work was presented at the Object-Oriented Programming, Systems, Languages & Applications Conference (OOPSLA) in 1987. In the early 1990’s, Erich Gamma and Richard Helm did a joint research that resulted in the first specific design patterns catalog. They identified four patterns: Composite, Decider, Observer, and Constrainer patterns. According to many authors, OOPSLA ’91 highlighted the evolutionary process of design patterns. The synergy between Erich Gamma, Richard Helm, Rala Johnson, and John Vlissides (better known as the “Gang of Four” or GoF) and other reputable researchers (Ward Cunningham, Kant Beck or Doug Lea) definitively launched the study of and research into Object Oriented Design Patterns. At the same time, James Coplien, another software engineer, was compiling and shaping a programming patterns catalogue in C++, which was a significant advance in the implementation phase in software development. Coplien’s catalog was published in 1991 under the title “Advanced C++ Programming Styles and Idioms”. Between 1991 and 1994 the concept of pattern design was discussed at international congresses and conferences. All of these encounters culminated in OOPSLA ’94. The GoF took advantage of this event to present their compilation (Gamma, Helm, Johnson & Vlissides, 1995). This publication, considered at that time as the best book on Object Orientation, compiled a 23-pattern catalog, founding the basis of patterns design. The number of pattern-related works, studies and publications in general, but especially in design, has exponentially grown since. However, the different research groups being born must be cataloged into three fundamental paradigms: • Theoretical approximations to the software pattern design concept and pattern languages. Coplien’s work (Coplien, 1996; 2004; Coplien & Douglas, 1995) stands out in this field. • Analysis and compilation of software applications design patterns. Rising’s efforts (Rising, 1998; 2000) and Buschmman (Buschmann, Meunier, Rohnert, Sommerlad & Stal, 1996; Buschmann, Rohnert, Stal & Schmidt, 2000) are included in this classification. • The study of special purpose patterns, like antipatterns (Brown, 1998).


2000 ◽  
Vol 147 (3) ◽  
pp. 61 ◽  
Author(s):  
V. Cortellessa ◽  
G. Iazeolla ◽  
R. Mirandola

IEE Review ◽  
1990 ◽  
Vol 36 (9) ◽  
pp. 338
Author(s):  
Stephen Wilson

1996 ◽  
Vol 11 (5) ◽  
pp. 270 ◽  
Author(s):  
Ana M.D. Moreira ◽  
Robert G. Clark

1995 ◽  
Vol 34 (04) ◽  
pp. 310-317 ◽  
Author(s):  
B. Séné ◽  
I. de Zegher ◽  
C. Milstein ◽  
S. Errore ◽  
F de Rosis ◽  
...  

Abstract:Currently, there is no widely accepted structured representation of drug prescription. Nevertheless, a structured representation is required for entering and storing drug prescriptions avoiding free text in computerized systems, and for drug prescription reviews. Derived from part of the work of the European OPADE project, we describe an object-oriented model of drug prescription which incorporates important concepts such as the phase and triggering event concepts. This model can be used to record all drug prescriptions, including infusions, in a structured way avoiding free text. The phase concept allows the storage of sequentially ordered dosage regimens for a drug within the same prescription. The prescription triggering event concept allows recording of the administration of a drug conditional to dates, symptoms and clinical signs, medical procedures, and everyday life events. This model has been implemented within the OPADE project; the corresponding aspects of the user interface are presented to show how this model can be used in practice. Even if other new attributes may be added to the described objects, the structure of this model is suitable for general use in software which requires the entry, storage and processing of drug prescriptions.


Sign in / Sign up

Export Citation Format

Share Document