On Tue, Nov 27, 2012 at 4:31 PM, Karl Williamson <public@khwilliamson.com>wrote: > There are several functions that are no longer used in the Perl core that > could be removed, along with their associated interpreter variables. These > are > is_uni_idfirst_lc > is_utf8_idfirst > is_utf8_xidfirst > is_utf8_idcont > > In addition, is_uni_idfirst and is_utf8_xidcont should be removed from the > core, replaced by ones that call internally known versions. This is > because Perl has slightly different definitions of what these should match ( > http://rt.perl.org/rt3/**Ticket/Display.html?id=74022<http://rt.perl.org/rt3/Ticket/Display.html?id=74022>), > and the current ones are getting the wrong definitions. > > And is_utf8_mark should also be removed. It is used in places by code > that implements an obsolete definition of a grapheme cluster. The current > definition doesn't need marks explicitly; so those places should change to > use the more modern definition. > > None of these functions are documented. They are listed in perlapi under > "Undocumented functions" with this caveat: > > "The following functions have been flagged as part of the public API, but > are currently undocumented. Use them at your own risk, as the interfaces > are subject to change." > > There should be no reason for xs code to access these. They don't (or > shouldn't) return the exact same results as Perl's core uses, and are > otherwise for outmoded views into Unicode. > > cpan grep with > -file:"ppport\.h|PPPort\.pm" is_(uni|utf8)_(mark|x?id(**first|cont)) > > returned 16 results. None of them look like they are actually using these > functions except as compatibility measures. > > I propose removing them. > Removing them is decently risky. I can't say we exactly know what the blackpan is doing with them. Things that are deprecated in the API are supposed to be moved to mathoms.c where they can be optimized out with a -DNO_MATHOMS when compiling. SteveThread Previous | Thread Next