develooper Front page | perl.perl5.porters | Postings from November 2011

Re: RFC: fc keyword API

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
November 26, 2011 04:08
Subject:
Re: RFC: fc keyword API
Message ID:
CAHhgV8hetsrykY1RpnLOfmD6GvVYZVRWfx0VUkEHuisX-f5KNw@mail.gmail.com
On Sat, Nov 26, 2011 at 3:55 AM, Brian Fraser <fraserbn@gmail.com> wrote:
> Even then, should we allow access to simple foldcasing through some API,
> like a feature? (examples of that below) Or leave it for CPAN to provide an
> implementation, like through Unicode::Casing and/or Unicode::CaseFold?

Is there any real-life advantage of using simple case folding over
lowercasing? My impression is not, and if so the discussion is moot.

> use open qw( :std :utf8 );
> use feature qw( say unicode_strings fc );

I think that's the obvious interface

> {
> use feature qw( full_casefolding );
> # Explicit full
> say fc("\x{df}"); # => "ss"
> }
>
> {
> use feature qw( simple_casefolding );
> # Explicit simple.
> say fc("\x{df}"); # => "\x{df}"
>
> no feature qw( simple_casefolding );
> # Nothing set, so back to full
> say fc("\x{df}"); # => "ss"
> }

Having two opposing features sounds like suck to me. If we really need
this (which I'm not convinced of), I'd go for something like «use
casefolding 'simple';»

Leon

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