Soliciting comments on Edison

Andrew J Bromage ajb@spamcop.net
Sat, 31 May 2003 16:48:08 +1000


G'day all.

On Thu, May 29, 2003 at 01:25:10PM +0100, Ross Paterson wrote:

> I'm not sure that the separate top-level name is justified.

I'm not so sure about that either, but the hierarchy document had one
last time I looked.

> Isn't it the other way round -- you write a program using certain
> operations, and then pick an implementation in which those operations
> are fast?  But things like Data.Queue would also be useful.

The problem is that in general, you don't know in advance precisely
which operations you're going to need until you've finished the code
which uses them.

If you use, say, a stack, you may find part-way through programming
that you occasionally need to inspect the second element on the stack,
which the stack ADT doesn't naturally support.  Rather than force you
to change ADTs, Edison just makes the operation available (possibly at
some run-time cost, which profiling should tell you about if it's
a problem).

Sometimes it also makes sense to choose the data structure through
operations.  Hence the facade modules.

Cheers,
Andrew Bromage