[Haskell-cafe] Array, Vector, Bytestring
cgaebel at uwaterloo.ca
Tue Jun 4 04:45:22 CEST 2013
How is this a problem?
If you're representing text, use 'text'.
If you're representing a string of bytes, use 'bytestring'.
If you want an "array" of values, think c++ and use 'vector'.
If you want to mutate arrays, first, make sure you do. You probably don't.
If you're sure, use MVector.
Don't use String, except to interface with legacy code. You probably want
Don't use Array. Anything it can be used for, can be done with 'vector'.
This covers all the use-cases that I can think of.
On Monday, June 3, 2013, wrote:
> On Mon, 03 Jun 2013 19:16:08 +0000
> > Hi everyone,
> > Every time I want to use an array in Haskell, I find myself having to
> > look up in the doc how they are used, which exactly are the modules I
> > have to import ... and I am a bit tired of staring at type signatures
> > for 10 minutes to figure out how these arrays work every time I use them
> > (It's even worse when you have to write the signatures). I wonder how
> > other people perceive this issue and what possible solutions could be.
> My opinion, it's every bit as bad you say it is...
> Not a clue as to what can be done about it.
> Probably yet another vector module.
> Haskell-Cafe mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe