Title
Global variables in Haskell
Abstract
Haskell today provides good support not only for a functional programming style, but also for an imperative one. Elements of imperative programming are needed in applications such as web servers, or to provide efficient implementations of well-known algorithms, such as many graph algorithms. However, one element of imperative programming, the global variable, is surprisingly hard to emulate in Haskell. We discuss several existing methods, none of which is really satisfactory, and finally propose a new approach based on implicit parameters. This approach is simple, safe, and efficient, although it does reveal weaknesses in Haskell's present type system.
Year
DOI
Venue
2004
10.1017/S0956796802004471
J. Funct. Program.
Keywords
Field
DocType
imperative programming,implicit parameter,existing method,efficient implementation,functional programming style,present type system,new approach,graph algorithm,good support,global variable
Programming language,Assignment,Functional programming,Computer science,Imperative programming,Theoretical computer science,Implementation,Haskell,Declarative programming,Global variable,Web server
Journal
Volume
Issue
ISSN
14
5
0956-7968
Citations 
PageRank 
References 
4
0.46
5
Authors
1
Name
Order
Citations
PageRank
John Hughes11573174.22