develooper Front page | perl.perl5.porters | Postings from February 2017

Re: Proposal: Rename utf8::is_utf8() to utf8::is_upgraded()

Thread Previous | Thread Next
From:
Kent Fredric
Date:
February 17, 2017 17:38
Subject:
Re: Proposal: Rename utf8::is_utf8() to utf8::is_upgraded()
Message ID:
CAATnKFCFLMeAsaud0BR8QeED2FGJCmCJve--FP62LW-DBZoCWw@mail.gmail.com
On 18 February 2017 at 03:51,  <pali@cpan.org> wrote:
>
> That should not break any existing code. And new people who do know what
> is utf8::is_utf8() doing will stop using it in new code.
>
> Idea is that people will stop using utf8::is_utf8() function which has
> really bad name.


This is probably more grounds for a critic policy at this point,
breaking working code because some people are using it wrong,
especially over such a large time scale, is not really great.

Especially given you'll have an almost certain chance that somebody
will "miss the memo" and will blindly go and replace all the use of
is_utf8 with is_upgraded, not fixing the underlying reason it was
wrong in the first place ( just like they missed the memo on why using
is_utf8 in the first place was wrong )

I know that sounds like fatalistic "but people will do bad things",
but given thats exactly the problem we're trying to avoid by renaming
it here, seems silly to overlook that human limitation :)

That's why a policy-based approach is probably "more sane", just
attach documentation to the policy as to what you should be doing and
why, and then turn on/off the policy as needed. I could have sworn
there was already a policy for this, but I can't find it *shrug*

The extra bright side of the policy is it serves no point of
contention from P5P's side of the equation :)



-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL

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