[Haskell-cafe] Re: ACIO versus Execution Contexts

Lennart Augustsson lennart at augustsson.net
Wed Dec 1 07:07:11 EST 2004

Adrian Hey wrote:
> On Tuesday 30 Nov 2004 3:02 pm, Lennart Augustsson wrote:
>>I reiterate:  not even device drivers written in C use TWIs.
>>(Well, at least not quality drivers. :))
> A finite pool of N devices is still a unique resource.
> Ultimately you have to contain the problem locally with a modular
> solution, or all the unique state handle "buck passing" to higher
> levels (via who knows what intermediate modules) takes you all
> the way up to main.
> This is technically feasible, but highly un-modular and certainly
> not a desirable characteristic of any programming language (at
> least not one whose use I would advocate).

It's not a language issue.  It's a design issue.  And in the case
of device drivers you do want to pass the buck up to the layer
that handles device drivers.  Having each driver keep it's own
global state is just broken.
But you don't seem to believe this, so I'll let you discover
it yourself. :)

I agree with you that at some level there has to be a unique
resource (for that computer), but it's not something I'd keep
in a global variable.

	-- Lennart

More information about the Haskell-Cafe mailing list