:: Re: [DNG] Functional Programming di…
Pàgina inicial
Delete this message
Reply to this message
Autor: ael
Data:  
A: dng
Assumpte: Re: [DNG] Functional Programming discussion 1/8/2025 7pm Eastern Standard time
On Wed, Jan 08, 2025 at 12:40:34PM +0100, karl@??? wrote:
> Steve Litt:
> ...
> > Here are some of the benefits articulated by Functional Programming
> > fans:
> >
> > * No side effects
> ...
>
> All printed output like (display "hello world\n") will have side effects,
> well, that's the reason d'etre for printouts.


Eh... monads. They provide a way to "partition" the space of
side-effects from the purely functional world in a completely safe way.
Although originally used for just this purpose (in computing -- their
real home is in category theory long before the use in computer
science), they turn out to have a far wider use.

So in a proper functional languages, all side effects are safely "hidden"
inside a monad while still being under functional control. Yes, it's
magic :-)

ael