The Downfall of Imperative Programming

Russel Winder russel at winder.org.uk
Tue Apr 10 04:28:03 PDT 2012


Two quite interesting points to make here:

1.  OCaml has a GIL and so, like CPython (*), is forced to use operating
system processes to obtain parallelism. Also OCaml has imperative
features, it is not a pure functional language.  Clojure followed this
route as well, using STM to deal with locking issues.

2. Haskell is a lazy language which means:
	a. it can work with infinite data structures; and
	b. it is incredibly difficult to create parallel codes.

Simon Peyton Jones and Simon Marlow have had to do a great deal of very
clever work to make Data Parallel Haskell, but it is to Haskell what
NumPy is to Python. 

I am a fan of declarative expression, I prefer functional approaches
over explicitly imperative ones.  For the moment though using single
assignment in imperative languages with all the lambda/closure
technology and using functional programming thinking is the best
compromise.  OCaml (and its clone F#) and Haskell are likely to remain
tiny bit part players for a long while.

On the JVM the interesting question is whether Clojure finally makes
Lisp a mainstream language outside of one or two domains.


(*) PyPy is experimenting with STM to replace use of a GIL.
-- 
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/1914a0e1/attachment.pgp>


More information about the Digitalmars-d mailing list