[Haskell-cafe] Why purely in haskell?

Anton van Straaten anton at appsolutions.com
Wed Jan 9 16:18:36 EST 2008


Peter Verswyvelen wrote:
> But I'm amazed that impure (albeit strong) languages like LISP and 
> Scheme are still used for projects... I mean, in Scheme you can "set!" 
> the addition operator to become a multiplication operator at runtime, 
> modifying global behavior... Now that's a side effect, C/C++ is nothing 
> compared to that! So I guess that with such great power comes great 
> responsibility?

Scheme and Lisp typically constrain this feature in various ways, 
ranging from compiler options and declarations to, more recently, 
features of a module system.

For example, in R6RS Scheme, variables and syntax imported via the 
module system cannot be mutated, so the denotation of a name (including 
names like "+") can be statically determined.

OTOH, the freedom to change things on the fly can be nice to have, and 
if used with "great responsibility" (mainly an understanding of what's 
safe to do and what isn't), the downside can be vanishingly small.

Anton



More information about the Haskell-Cafe mailing list