Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: callcc/cps-style programming
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Julian Assange <proff@i...>
Subject: Re: callcc/cps-style programming
Chet Murthy <chet@watson.ibm.com> writes:

> Stuff like:
> 
>   (i) allocating memory in the middle of a finalizer -- e.g., a
>   finalizer which is pushing some reusable resource onto some stack
>   (and the stack needs to be grown)
> 
>   (ii) locking some object in a finalizer, which can also be locked by
>   some thread that which would allocate memory with that lock held.
> 
>   (iii) SMP-unsafe code galore -- race conditions, memory-incoherence,
>   thrash-prone code.

If code is written in a functional manner, almost all of these problems
disappear. This is why functional languages and concurrency dovetail so
nicely together. Further, in some cases you can use concurrency to hide
state changes; allowing one to write functional code where previously
it was unatural to do so.

--
 Julian Assange        |If you want to build a ship, don't drum up people
                       |together to collect wood or assign them tasks
 proff@iq.org          |and work, but rather teach them to long for the endless
 proff@gnu.ai.mit.edu  |immensity of the sea. -- Antoine de Saint Exupery