[Haskell-cafe] Re: Go Haskell! -> array libraries
Andrew Coppin
andrewcoppin at btinternet.com
Sat Nov 29 13:23:29 EST 2008
John Lato wrote:
> I would love to see a perfect, unified array library in Haskell. I
> think everyone would. However, the problem Don, Roman, and others
> have raised is that there is no single consensus on what that library
> would look like, or how it would be implemented. It might be
> impossible for one library to fill the entire design space. Don's
> point is that, since this isn't yet a solved problem, having multiple
> implementations available to see what works well (and what doesn't) is
> a necessary step in finding a solution.
>
Interesting. I thought this was more or less a solved problem, it's just
that nobody has yet had time to implement it all.
I mean, the Haskell '98 array libraries are OK, they're just rather
incomplete. We could do with the ability to have unboxed arrays of
arbitrary types. (Remember, this is the default position in Pascal / C /
C++ / most normal programming languages - although admittedly they don't
have ADTs.) It would be useful to have the option to dispence with Ix.
(And bounds checks, if you're sure you don't need them.) It would also
be useful to be able to "slice" arrays. And we have the new
parallel-array stuff coming now, but (AFAIK) it's fairly nontrivial to
switch between normal arrays and parallel ones. Plus there are lots and
lots of "obvious" and useful functions that aren't in the libraries.
(E.g., in-place map for mutable arrays.) It seems silly to reimplement
these every time you want to do something; they should be in the libraries.
I doubt there will ever be a "perfect" library for anything. But that
doesn't mean we can't take a few steps in the right direction. ;-)
> I also think this is a exactly why Hackage needs a way to indicate
> that packages are deprecated/superceded by other packages. There was
> some talk about this recently, and IIRC even a submitted patch. I
> hope that gets adopted soon.
>
Agreed.
This goes beyond array libraries; do you have any idea how many "binary"
packages there are?
More information about the Haskell-Cafe
mailing list