Including both static and dynamic typing in the same programming language
- 26 August 2010
- journal article
- Published by Institution of Engineering and Technology (IET) in IET Software
- Vol. 4 (4) , 268-282
Abstract
Dynamic languages are becoming increasingly popular for different software development scenarios such as Web engineering, rapid prototyping or the construction of applications that require runtime adaptiveness. These languages are built on the idea of supporting reasoning about (and customising) program structure, behaviour and environment at runtime. The dynamism offered by dynamic languages is, however, counteracted by two main limitations: no early type error detection and fewer opportunities for compiler optimisations. To obtain the benefits of both dynamically and statically typed languages, the authors have designed the StaDyn programming language that provides both approaches. StaDyn keeps gathering-type information at compile time, even when dynamic variables are used. This type information is used to offer early type error detection, direct interoperation between static and dynamic codes and better runtime performance. Following the Separation of Concerns principle, it is possible to customise the trade-off between runtime flexibility of dynamic typing and safety, performance and robustness of static typing. A runtime performance assessment is presented to show an estimate of the benefits of combining dynamic and static typing in the same programming language.Keywords
This publication has 14 references indexed in Scilit:
- Efficient virtual machine support of runtime structural reflectionScience of Computer Programming, 2009
- Practical, pluggable types for a dynamic languageComputer Languages, Systems & Structures, 2009
- Dynamic adaptation of application aspectsJournal of Systems and Software, 2004
- Precise concrete type inference for object-oriented languagesACM SIGPLAN Notices, 1994
- Context-sensitive interprocedural points-to analysis in the presence of function pointers1994
- Strongtalk1993
- Efficiently computing static single assignment form and the control dependence graphACM Transactions on Programming Languages and Systems, 1991
- Dynamic typing in a statically typed languageACM Transactions on Programming Languages and Systems, 1991
- Basic polymorphic typecheckingScience of Computer Programming, 1987
- A theory of type polymorphism in programmingJournal of Computer and System Sciences, 1978