functional programming

François Pinard pinard at iro.umontreal.ca
Tue Feb 22 22:08:08 EST 2000


neelk at brick.cswv.com (Neel Krishnaswami) écrit:

> Whenever I have code that needs to be thread-safe, I find it tons easier
> to write in a functional style than worry about locking and race conditions
> and reentrancy and awful things like that.

I see.  Thanks for the hint.  I might use it one day...

> > P.S. - Yes, I know it has been theoretically proven that we could design
> > computers needing no energy, if we could fully avoid side-effects, but I
> > beg to do not consider this a practical advantage yet. :-)

> Actually, this *isn't* so!

Oh, this was proven in the field of quantic computing, if I remember what
I've heard.  I'm not especially knowledgeable in either thermodynamics
nor quantum physics, so I'm not going to argue either way!

> Here's the critical bit: this means that resetting those bits
> decreased the information in the system!

Resetting a bit _is_ a side effect.  The statement was that that a computing
device might use zero energy if without side effects.  Surely not a
traditional computer...

P.S. - Thanks for the entertainment in your previous message! :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list