[HOpenGL] GL utilities, toolkits, and questions..
Alastair Reid
alastair@reid-consulting-uk.ltd.uk
22 Jul 2002 17:42:08 +0100
> Good. BTW I don't think it's a good idea to write bindings for a
> widget set, because they're written in C, and could take bugs and
> segfaults.
I disagree rather strongly (which is why I've spent so much time over
the last 8 or 9 years working on interfacing Haskell to C).
It takes a lot of effort to develop a good library. You spend a lot
of time on design, implementation, bugfixing, figuring out
interactions with other libraries/ software, documenting it, writing
tutorials, getting publishers to accept books about it, revising the
design, performance tuning, etc. I don't think it makes sense to
repeat that effort unless there is some clear benefit to be had. This
benefit can include (in fact, usually consist of) things like getting
a PhD, exploring a new design style, demonstrating feasability,
etc. but it's hard to develop a product which is of higher quality
than one in which so much time has already been invested.
In the specific case of widget sets, two important goals are
maintaining the same look and feel (whether one likes it or not) and
maintaining the same interface with configuration mechanisms as on the
system you are developing for. And, when Haskell is the
implementation language, we should consider resource usage, long term
memory behaviour and behaviour under stress: when the machine is
thrashing, when handling exceptions, when the thread allocation limit
is reached, etc. (I single Haskell out here because by making more
things implicit than many other languages, Haskell makes it harder to
reason about and deal with failure.)
For this reason, I think it makes a lot more sense to incorporate existing
libraries into Haskell and then build cleaner layers on top.
--
Alastair Reid alastair@reid-consulting-uk.ltd.uk
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/