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

Re: ???strict??? strings?

Thread Previous | Thread Next
From:
Zefram via perl5-porters
Date:
January 6, 2020 13:18
Subject:
Re: ???strict??? strings?
Message ID:
20200106131831.rjhq232xe24lxpcf@fysh.org
Felipe Gasper wrote:
>so couldn't any existing code be rectified?

Ah, not sounding so opt-in now.  We prefer to keep existing Perl code
running.  And no, existing code can't necessarily be `rectified' to work
with a character/octet type distinction.  It's not so much the code that's
the issue as the APIs: the type distinction would have to be introduced
into most existing APIs (most involve strings in some capacity),
requiring every module author to decide new semantics for their API.
What really wouldn't work is APIs that currently generate strings that
are useful both as character strings and as octet strings, and which
are currently, correctly, used both ways by callers.  Introducing the
type distinction would make such usage impossible.

-zefram

Thread Previous | 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