Reputation: 1166
What is the benefit of having string as a list of integers rather than an independent data type in Erlang? Is this to make the string manipulation easier and more efficient? Are there any other reasons for this?
Upvotes: 1
Views: 191
Reputation: 5931
I believe (TM) that the only benefit was to allow them to implement wide character representations (unicode, utf-x, ...) in a robust way. On the down side, the performance is much less efficient than linear byte arrays. That said, Erlang was never really meant to be used for heavy string manipulations and so the performance of doing so shouldn't matter.
Upvotes: 3