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

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

Thread Previous | Thread Next
October 2, 2014 11:42
Re: [perl #122853] Guarantee 0-9, A-Z, a-z character classes
Message ID:
On Thu, Oct 02, 2014 at 09:30:09AM +0200, demerphq wrote:
> [Much discussion snipped]
> I dont think whether people offhand know how many characters are in the
> unicode character set [%-{] is relevant. The point is that once you looked
> it up you should be able to rely on it everywhere Perl runs. And if you
> took this kind of argument to the extreme it would lead to seriously
> bizarre consequences.

Let's not blow things out of proportion.

How much code is actually effected by this? EBCDIC isn't exactly a
major platform, and I'd bet that most Perl programmers never have
written code that needs to run on both EBCDIC and non-EBCDIC platforms.
On top of that, [%-{] and friends isn't that common either. I doubt
there's a serious sized corpus of code that's affected by this.

Sure, that [%-{] matches a different set of characters on EBCDIC and
non-EBCDIC is unfortunate, but in practise, has that ever lead to
problems? Do we have a list of bug reports related to this? Are there
(m)any questions related to this on Perlmonks, Stackoverflow, Usenet?

In theory, we could "fix" this, but is that worth the effort? Hasn't
EBCDIC been on edge of being dropped as a supported platform for quite
some time now, due to the unability of testing the platform?

My advice: if you write code that you think will run on EBCDIC, don't
use [%-{]. (I would say, not using [%-{] ever in serious code is a
smart thing to do anyway).


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