Title :
Implementing functional languages on object-oriented virtual machines
Author :
Perry, N. ; Meijer, E.
Author_Institution :
Dept. of Comput. Sci., Univ. of Canterbury, Christchurch, New Zealand
Abstract :
Hosting functional languages in object-oriented environments, such as the Java Virtual Machine and Microsoft´s Common Language Infrastructure, so that they inter-operate well with other languages presents a number of problems. In the paper the authors introduce Mondrian, a functional language specifically designed for such environments, and describe the decisions and trade-offs in its design. The paper concentrates on the high-level design decisions made for Mondrian. The authors cover the design of a type system which is part-way between the traditional parametric polymorphism and sum type models of functional languages and the sub-type models used by the virtual machines. Next they discuss how function values and nonstrict evaluation can be provided while supporting easy inter-working with strict object-oriented languages. They briefly comment on the low-level implementation of Mondrian and conclude with a multi-language example using Mondrian and C#. The work shows that, with appropriate design, it is possible to combine functional and object-oriented programming without losing the unique benefits of each.
Keywords :
functional languages; object-oriented languages; object-oriented methods; object-oriented programming; type theory; virtual machines; Microsoft common language infrastructure; Mondrian functional language; design decisions; object-oriented languages; object-oriented programming; sum type models; traditional parametric polymorphism; virtual machines;
Journal_Title :
Software, IEE Proceedings -
DOI :
10.1049/ip-sen:20040320