develooper Front page | perl.perl5.porters | Postings from October 2014

[perl #122853] Guarantee 0-9, A-Z, a-z character classes

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
October 30, 2014 11:19
Subject:
[perl #122853] Guarantee 0-9, A-Z, a-z character classes
Message ID:
rt-4.0.18-20720-1414667989-1284.122853-15-0@perl.org
On Thu Oct 30 01:25:13 2014, aristotle wrote:
> * Father Chrysostomos via RT <perlbug-followup@perl.org> [2014-10-30 06:05]:
> > On Wed Oct 29 21:44:19 2014, public@khwilliamson.com wrote:
> > > The remaining question I have is what happens if only one end of the
> > > range is a Unicode construct?
> > >
> > > [\N{U+04}-\x{09}]
> > > [\x{04}-\N{U+09}]
> > >
> > > I think this should be deprecated,
> >
> > I don’t think it should be deprecated. Most of us don’t care whether
> > our code runs on EBCDIC, so things that just work on ASCII platforms
> > should not be deprecated or removed because of EBCDIC-accommodating
> > reasoning.
> 
> Are you arguing a principle here

That.

> or do you have code that would break?
> (In which case, how much?)
> 
> To me the principle behind this deprecation is not “this would not port
> to EBCDIC so you should not be doing this” but “we are making \x and \N
> mean different things that cannot semantically be mixed”.

But on ASCII systems character ranges are simple (start at the Unicode codepoint specified by the left-hand character and iterate through them to the right-hand character).  I don’t think making them more complex brings any benefit.  On EBCDIC, due to the model that Perl follows, they are naturally complex, but that complexity needn’t affect code and programmers that never come in contact with EBCDIC.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: resolved
https://rt.perl.org/Ticket/Display.html?id=122853

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