[Haskell-cafe] Is the #functional programming paradigm antithetical to efficient strings? #Haskell
Richard A. O'Keefe
ok at cs.otago.ac.nz
Mon Jul 11 02:06:32 UTC 2016
On 11/07/16 6:44 AM, KC wrote:
>
> Is the #functional programming paradigm antithetical to efficient
> strings? #Haskell
>
What on earth does "efficient strings" mean?
To the extent that I can extract any meaning from that,
the answer is "no, obviously not".
The functional programming paradigm includes languages
like ML, which has always had packed-array-of-byte strings
and corresponding contiguous-slice-of-shared-packed-array-of-byte
substrings, and languages where the default implementation is
a singly-linked list with one cell per code.
What is "efficient" is a matter of what you are *doing* with
the strings.
An important consideration these days is that the old idea of
a mutable array with one element per character (which was never
the only way to implement strings) is a very poor fit for Unicode.
More information about the Haskell-Cafe
mailing list