Title
What is a purely functional language?
Abstract
Functional programming languages are informally classified into pure and impure languages. The precise meaning of this distinction has been a matter of controversy. We therefore investigate a formal definition of purity. We begin by showing that some proposed definitions which rely on confluence, soundness of the beta axiom, preservation of pure observational equivalences and independence of the order of evaluation, do not withstand close scrutiny. We propose instead a definition based on parameter-passing independence. Intuitively, the definition implies that functions are pure mappings from arguments to results; the operational decision of how to pass the arguments is irrelevant. In the context of Haskell, our definition is consistent with the fact that the traditional call-by-name denotational semantics coincides with the traditional call-by-need implementation. Furthermore, our definition is compatible with the stream-based, continuation-based and monad-based integration of computational effects in Haskell. Finally, we observe that call-by-name reasoning principles are unsound in compilers for monadic Haskell.
Year
DOI
Venue
1998
10.1017/S0956796897002943
J. Funct. Program.
Keywords
Field
DocType
beta axiom,call-by-name reasoning principle,pure observational equivalence,proposed definition,functional language,traditional call-by-need implementation,traditional call-by-name denotational semantics,monadic haskell,pure mapping,formal definition,parameter-passing independence,functional programming language
Lexical definition,Programming language,Functional programming,Axiom,Computer science,Continuation,Denotational semantics,Haskell,Soundness,Monad (functional programming)
Journal
Volume
Issue
Citations 
8
1
13
PageRank 
References 
Authors
0.77
18
1
Name
Order
Citations
PageRank
Amr Sabry152035.46