Treffer: Java as a functional programming language

Title:
Java as a functional programming language
Authors:
Source:
TYPES 2002 : types for proofs and programs (Berg en Dal, 24-28 April 2002, selected papers)Lecture notes in computer science. :279-298
Publisher Information:
Berlin: Springer, 2003.
Publication Year:
2003
Physical Description:
print, 1 p.3/4
Original Material:
INIST-CNRS
Document Type:
Konferenz Conference Paper
File Description:
text
Language:
English
Author Affiliations:
Dept. of Computing Science, University of Wales Swansea, Singleton Park, Swansea SA2 8PP, United Kingdom
ISSN:
0302-9743
Rights:
Copyright 2003 INIST-CNRS
CC BY 4.0
Sauf mention contraire ci-dessus, le contenu de cette notice bibliographique peut être utilisé dans le cadre d’une licence CC BY 4.0 Inist-CNRS / Unless otherwise stated above, the content of this bibliographic record may be used under a CC BY 4.0 licence by Inist-CNRS / A menos que se haya señalado antes, el contenido de este registro bibliográfico puede ser utilizado al amparo de una licencia CC BY 4.0 Inist-CNRS
Notes:
Computer science; theoretical automation; systems
Accession Number:
edscal.14985412
Database:
PASCAL Archive

Weitere Informationen

We introduce a direct encoding of the typed A-calculus into Java: for any Java types A, B we introduce the type A → B together with function application and A-abstraction. The latter makes use of anonymous inner classes. We show that A-terms are evaluated by call-by-value. We then look at how to model domain equations in Java and as an example consider the untyped lambda calculus. Then we investigate the use of function parameters in order to control overriding and in order to dynamically update methods, which can substitute certain applications of the state pattern. Further we introduce a foreach-loop in collection classes. Finally we introduce algebraic types. Elements of the resulting type are given by their elimination rules. Algebraic types with infinitely many arguments like Kleene's O and simultaneous algebraic types are already contained in that notion. Further we introduce an operation selfupdate, which allows to modify for instance a subtree of a tree, without making a copy of the original tree. All the above constructions are direct and can be done by hand.