[erlang-questions] Changes to string module
Lloyd R. Prentice
Fri Jul 21 16:02:51 CEST 2017
I can appreciate the reasons for the changes, but it has created moments of frustration for me.
I'm running an earlier version of Erlang. Plan to upgrade, but not yet. My work habit is to frequently consult on-line Erlang docs.
The other day I looked up string:span/2, which I've used in various places throughout my code. But what's this? It's marked "obsolete - use take/2."
I must have caught the docs at a point of transition since there was no take/2 in the list of string functions. What to do? What to do?
That version of the docs seems to have been updated. Both take/2 and span/2 are now in the list.
OK, I can live with momentary and passing frustration. But now, when I upgrade Erlang, do I have to worry that span/2 will be dropped at some point--- after all, it's "obsolete."
Or do I have run two versions of Erlang?
Plus, I now find the string docs much harder to use since I have to think about whether a given function is in my version of Erlang or not.
Petty issues and, perhaps the price of progress. But it does illustrate that library revision may have unintended consequences.
Sent from my iPad
> On Jul 21, 2017, at 4:46 AM, zxq9 <zxq9@REDACTED> wrote:
> I missed it when looking through R20 release notes, but on referencing the string module I noticed a LOT of changes have happened there. String objects are now more or less based on unicode:chardata() and utf8 graphemes.
> Whoever is responsible for this -- THANK YOU.
> For those of us in East Asia life just got a bit easier. Not 100% easy, because what fun would that be, but this sure is a lot nicer.
> erlang-questions mailing list
More information about the erlang-questions