[Haskell-cafe] Array, Vector, Bytestring

Clark Gaebel 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'.

  - Clark

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
> silvio <silvio.frischi at gmail.com <javascript:;>> wrote:
> > 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
> Haskell-Cafe at haskell.org <javascript:;>
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130603/260165f0/attachment.htm>

More information about the Haskell-Cafe mailing list