Proposal: split Chan and TChan into read and write ends

Simon Marlow marlowsd at gmail.com
Mon Nov 5 10:50:47 CET 2012


On 28/10/2012 01:37, wren ng thornton wrote:
> On 10/27/12 12:28 PM, Johan Tibell wrote:
>> I think this makes for a great package or perhaps an extra
>> Unidirectional module nested inside the Chan module. Breaking the well
>> used Chan API doesn't seem necessary in this case.
>
> I agree. I like the idea, and I'd like to see it gain traction, but I'm
> not so keen on breaking the Chan/TChan API.

That sums up my thoughts too.  I am especially reluctant to change the 
Chan/TChan API since then some parts of my (in progress) book will need 
to be rewritten to take the changes into account.

Extra type safety is good, but it doesn't come completely for free - 
there is a bit of extra plumbing and hence program noise from the split API.

> It sounds like many people have implemented versions of this and
> uploaded them to Hackage already. Perhaps the best approach would be to
> (1) unify all those packages into a single "blessed" package, to reduce
> redundancy; (2) advertise that package as the way to go for new
> projects; (3) add it to the Platform if it gains traction; (4) maybe get
> around to deprecating the current Chan/TChan API some years down the
> road when it's no longer popular.

Yep,  +1

Cheers,
	Simon




More information about the Libraries mailing list