develooper Front page | perl.perl5.porters | Postings from March 2007

Re: the utf8 flag (was Re: [perl #41527] decode_utf8 sets utf8 flag on plain ascii strings)

Thread Previous | Thread Next
From:
Juerd Waalboer
Date:
March 30, 2007 16:41
Subject:
Re: the utf8 flag (was Re: [perl #41527] decode_utf8 sets utf8 flag on plain ascii strings)
Message ID:
20070330234038.GF31277@c4.convolution.nl
Marvin Humphrey skribis 2007-03-30 16:06 (-0700):
> I strongly disagree with this assessment.  In particular, I think  
> insisting that the user be responsible for manually segregating  
> character and byte-oriented data without any help from Perl is  
> totally unreasonable.

That is okay. You are not alone.

In fact, I would also like to have real types.

But Perl has had its current model for quite a while. If you don't
agree, there are a few things that you can do:

1. Find a way to do it better, in a backwards compatible way, and then
   either
1a. implement it yourself
1b. document it and hope that someone else has the tuits

2. Find a way to do it better, in a non-backwards compatible way, and
   then either
2a. fork perl and implement it yourself
2b. document it and hope that someone else has the tuits

3. Just use the tools that Perl currently provides.

Any of these are totally valid options. Gerard Goossen, for example, has
picked 2a. I picked 3. Which one is your favourite?

> I hope that Perl 6 does not opt to replicate Perl 5's behavior in
> this area (my understanding is that it will not, but I'm not
> following development closely).  

You are right. Perl 6 will have distinct byte string types ("buf" for
"buffer"), and character string types ("str" for "string").

I guess Perl 6 follows the 2nd path, with both a and b simultaneously :)

> How about encouraging the use of encoding::warnings in perlunitut?

See my other post about why this module is not what you want.
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <juerd@juerd.nl>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy <sales@convolution.nl>

Ik vertrouw stemcomputers niet.
Zie <http://www.wijvertrouwenstemcomputersniet.nl/>.

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