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

Encoding WAS Re: Announcing Perl 7

Thread Next
From:
Felipe Gasper
Date:
June 29, 2020 23:46
Subject:
Encoding WAS Re: Announcing Perl 7
Message ID:
2560C659-6E5C-4E4E-B820-C349B42DD07D@felipegasper.com

> On Jun 29, 2020, at 6:59 PM, Eric Brine <ikegami@adaelis.com> 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.

-FG
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About