[clean-list] Advice on style, please

Fergus Henderson fjh@cs.mu.oz.au
Mon, 17 Dec 2001 18:08:02 +1100


On 16-Dec-2001, alanh@dcs.kcl.ac.uk <alanh@dcs.kcl.ac.uk> wrote:
> I don't want to use the "#" notation, as that obscures the declarative
> nature of the language.

That sounds a bit like programming with one hand tied behind your back.

> One problem is the need to supply seemingly real files as values when
> the program has already detected an error.  The type system demands it.
> It would be nice if there were a "null file" which could act as a 
> place holder, where the code below uses silly calls of the form
>     fopen "" FReadText w1
> Any suggestions?

How about using a discriminated union type, like Haskell's `Maybe' type?

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.