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

Re: [perl #131685] Rename utf8::is_utf8() (and other functions)

Thread Previous | Thread Next
H.Merijn Brand
July 13, 2017 06:44
Re: [perl #131685] Rename utf8::is_utf8() (and other functions)
Message ID:
On Wed, 12 Jul 2017 22:53:57 -0600, Karl Williamson
<> wrote:

> It came about not because of AvFILL, but because of the already-existing 
> synonym, the evilly named "av_len".  This name implies it gives a 
> length, but in fact it is one-off from that.  av_top_index, though 
> cumbersome, accurately indicates what it returns.

The problem with av_top_index is that it hat not (yet) been ported to
Devel::PPPort, so I cannot change any XS code that uses av_len into
using the new function if that XS is to support 5.16.0 or older

$ ack av_top_index

I know I didn't quote all of your message and I understand your
motivation, but the problem for these misnamed functions is much wider
than the scope of av_top_index, which is *only* available to XS, and XS
is more or less easy to fix by adding stuff to Devel::PPPort

For the utf8 functions, the scope is WAY wider: it is used from
pure-perl, and renaming them (with or without aliases) would cause
major brain damage for all authors that use these functions (correct or
incorrect) when their code has to work on a wide range of perl versions.

To be honest, I do not see an easy way out of that dilemma. If you have
one, I'm open to change for the better.

H.Merijn Brand   Perl Monger
using perl5.00307 .. 5.27   porting perl5 on HP-UX, AIX, and openSUSE

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