xsl-list
[Top] [All Lists]

Re: The real harm is in functions with side effects (Was: Re: Using Extension Functions - Its Efficiency)

2004-01-19 03:42:35
Unfortunately, some functional languages (XSLT included) lack a built-in
support for controlling side-effects.

Haskell has the notion of a Monad class built-into the language and any
programmer simply uses the IO (or any other suitable type) Monad, when
this is necessary.

The only thing is that Monads are not built into the language. IO Monads
are built-in, but, in the same sense as print capabilities are built into
some languages, it does not mean that all functions are built-in. 
Monads are just continuation passing -- many things are expressed with Monads,
and can be done with any facility with first-order functions. 

Monads are as good in Java, Scheme, Ruby, and even in python as they are in 
Haskell,
the thing XSLT lacks is first-order functions, not Monads.

David Tolpin

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list