String data type
Robert Virding
rv@REDACTED
Fri Feb 16 12:37:19 CET 2001
Mickael Remond <mickael.remond@REDACTED> writes:
>
>Hello,
>
>Some times ago, the Erlang people talked about adding the string type into the
>Erlang code.
>Is this still something that are interesting the OTP people ?
>
>This type would be needed by some of our project and I was thinking that maybe
>we could help on those aspects
>
>Do you have any idea on how to do it ?
>Do you know how hard it would be ?
The first question is of course what do you *mean* by a string
datatype? What type of operations do you intend to do on these
strings?
Binaries provide efficient storage of bytes and with the new bit-syntax
you also get quite a good interface to access binaries. There are some
things to watch when building but otherwies it works well. However
there are not many libraries to do the same type of operations on
binary strings as for normal list strings.
One thing to remember though is that most of the low-level i/o modules
and functions also accept lists of bytes and binaries for output so it
is practical to use different handling for different parts of a message.
For example I can pull apart a binary message, process the wrapper, pass
the data straight through as a binary and recombine it on output with a
new wrapper.
Robert
More information about the erlang-questions
mailing list