[Haskell-cafe] Array, Vector, Bytestring

Jason Dagit dagitj at gmail.com
Tue Jun 4 05:00:36 CEST 2013

On Mon, Jun 3, 2013 at 7:45 PM, Clark Gaebel <cgaebel at uwaterloo.ca> wrote:
> 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
> 'text'.
> Don't use Array. Anything it can be used for, can be done with 'vector'.

You have to build multidimensional accessors for vector yourself.
Array supports them out of the box. I still prefer vector, but it's
only fair to note that multidimensional data is a weak spot of vector.


More information about the Haskell-Cafe mailing list