[Haskell-cafe] On the purity of Haskell

Donn Cave donn at avvanta.com
Fri Dec 30 19:36:46 CET 2011


Quoth Steve Horne <sh006d3592 at blueyonder.co.uk>,
> On 30/12/2011 10:41, Bardur Arantsson wrote:
>>
>> This doesn't sound right to me. To me, a "side effect" is something 
>> which happens as a (intended or unintended) consequence of something 
>> else. An effect which you want to happen (e.g. by calling a procedure, 
>> or letting the GHC runtime interpreting an IO Int) is just "an effect".

> Trouble is, whether it sounds right doesn't really matter - that's just 
> an artifact of the meaning you're most familiar with. Any specialist 
> field has it's own jargon, including old words given new 
> related-but-different meanings.

It may help to recall that the point of Haskell is to write computer
programs, and by extension the point of discussing its properties
and semantics.  Mostly we intend to refine our understanding of those
properties and semantics;  sometimes we may hope to actually improve
them by questioning things that haven't been, but perhaps could be,
rigorously defined. (That's how I read some of Conal Elliott's recent
posts, for example - but of course, it's still a legitimate question:
does it matter, if we only want to write programs?)

That's why we use terms in a sense that apply meaningfully to computer
programming languages in general and Haskell in particular.  To do
otherwise - for example to insist on a definition of "pure" that could
not even in principle apply to any useful programming language, or a
definition of "side effect" that would have to apply every time a
program does anything - seems to me like an inane waste of time, to
put it mildly.

	Donn



More information about the Haskell-Cafe mailing list