Python vs D [ was Re: Bartosz about Chapel ]

Russel Winder russel at russel.org.uk
Thu Nov 10 02:00:14 PST 2011


On Thu, 2011-11-10 at 01:31 -0800, Walter Bright wrote:
[...]
> When I wrote that, I was thinking of things D has like support for concurrency, 
> immutability and purity. These are outside the static vs dynamic typing issue, 
> and so I thought it fair to consider them. I also believe they are powerful and 
> important features.

Concurrency, and it partner in crime parallelism -- which is related but
very different -- is a big issue on which Python currently, more or
less, sucks.  Multiprocessing is a great package and implements
processes and message passing, but is massively heavyweight.  PyPy is
looking to use the lessons of Stackless and STM to remove the GIL, but
Guido seems committed to keeping the GIL in CPython.  PyPy is already 5
times faster than CPython, and with the GIL removed stands to become the
replacement realization of Python for everyone.

Immutability is a weird concept in Python because it does not have the
"variables as labelled boxes holding values" model of variable, it has
"entry in dictionary" model of variables.  If you want to say:

	Math.PI = 3

you can: Python allows all symbols (bar two or three weird ones) to be
rebound as and when.  Or to put it another way Python doesn't understand
the word immutability, at least of variables.  Immutability of values is
a different matter:  list values, dict values, and set values are
mutable, all other values are immutable.

Purity is not really something I understand here without some lead in.
I guess I failed to read part of Andrei's book ;-)

-- 
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 russel.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/20111110/fafa92a6/attachment.pgp>


More information about the Digitalmars-d mailing list