The Downfall of Imperative Programming

Russel Winder russel at winder.org.uk
Tue Apr 10 12:13:45 PDT 2012


On Tue, 2012-04-10 at 20:46 +0200, Gour wrote:
[...]
> That's right...I tried with Haskell, liked its syntax a lot, but was not
> sure I really grokked monads. Moreover, I lost few potential
[...]

The biggest problems with monads are that most imperative programmers
think they are some massive high magic that is incomprehensible to mere
mortals, and  most functional programmers think they are simple and that
they understand them.

Monads are just things with a couple of methods of certain signatures
and that have behaviour not unrelated to continuations.  If you get
higher order functions, currying and partial evaluation, then monads
come naturally (*).

(*) But only once they were initially thought of as programming entities
rather than some aspect of Category Theory.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120410/23f06d77/attachment.pgp>


More information about the Digitalmars-d mailing list