develooper Front page | perl.perl5.porters | Postings from June 2020

Encoding WAS Re: Announcing Perl 7

Thread Next
Felipe Gasper
June 29, 2020 23:46
Encoding WAS Re: Announcing Perl 7
Message ID:

> On Jun 29, 2020, at 6:59 PM, Eric Brine <> wrote:
> Sawyer X speaks of making it easy to accept newcomers, and I think one of the biggest difficulties facing newcomers is dealing with encoding and decoding.

I know seasoned Perl developers who struggle with Perl’s character encoding logic. Until embarrassingly-recently I was one of them, and I’m still a bit nervous to claim I now understand it.

It *IS* fairly simple, I think, once the crucial pieces “click” mentally. But that “click” is, IMO, far from “default”. And, like reference-counting in C, it’s fiendishly easy to make a subtle mistake that may not manifest until you’re far removed from the context where the bug is.

Perl’s “happy confusion” between character-vs.-byte strings is a stumbling block for so many. It aggravates the learning curve for newcomers and complicates IPC with other languages. If we could somehow have “introspectable” string types--strings that “know” whether they represent octets or characters--I think that would be a boon for everyone.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About