On 3/28/2015 1:32 PM, Sönke Ludwig wrote:
I/O is crucial of course, but there are also a lot of other important and
inherently impure things such as message passing.
If the message channel is passed as a parameter to the droutine, then the
droutine can still be pure.
I think such a restriction
would go way too far. Both fiber and task local storage can also be very useful
at times, so it would be a pity to rule them out completely.
You'd also usually have the whole application running on "droutines" and not
simply use them as a local tool for occasional parallelism needs. This is
especially true for any kind of server application. So effectively such a
limitation may in practice end up as a limitation of the entire language.
On the other hand, if purity can make droutines much more practical, the
tradeoff might be worth it.