A C-like if statement

Diez B. Roggisch deets at nospam.web.de
Fri Feb 24 08:36:16 EST 2006


Roy Smith wrote:

> In article <pan.2006.02.24.11.07.19.764837 at REMOVETHIScyber.com.au>,
>  Steven D'Aprano <steve at REMOVETHIScyber.com.au> wrote:
> 
>> Side-effects aren't always bad (import, for example, does all its work by
>> side-effect). But they are generally frowned upon, and in functional
>> languages they are verboten.
> 
> How do you do any I/O in a functional language if side effects are
> verboten?  For that matter, how does a functional program ever stop
> running?

Using Monads. Which basically starts carrying around explicit state in an
implicit manner. But that is restricted to very few, specific portions of
the program. 

Diez



More information about the Python-list mailing list