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

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

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
July 13, 2017 06:44
Subject:
Re: [perl #131685] Rename utf8::is_utf8() (and other functions)
Message ID:
20170713084348.7ea97246@pc09.procura.nl
On Wed, 12 Jul 2017 22:53:57 -0600, Karl Williamson
<public@khwilliamson.com> 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
ppport.h
1225:av_top_index||5.017009|
$

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  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.27   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

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