Front page | perl.perl5.porters |
Postings from January 2012
Re: pack and ASCII
Thread Previous
|
Thread Next
From:
Ricardo Signes
Date:
January 15, 2012 19:01
Subject:
Re: pack and ASCII
Message ID:
20120116030119.GB18170@cancer.codesimply.com
Wow, what a thread. About sixty-eight messages, by my count, and I am very
pleased to see that it never got much worse than exasperation.
This is what I think:
* It bugs the heck out of me that pack is now meant to also be used validly
with character strings that have not been encoded some portable
byte-oriented representation
* ...but it can.
* ...and the ship sailed on this a long time ago.
I think there are a few kinds of warnings that could be added. They boil down
to:
* warnings that would be erroneous too often in reasonable cases, if you are
willing to accept the use of (forgive me) "pack as sprintf"
* warnings that guard against cases so specific as to not be worth implementing
I think we /must/ accept the use of pack on character strings for the time
being -- and "the time being" is not a short time value, here. If I used pack
more often, I would probably write a little wrapper to complain about wide
characters. Of course, even that wouldn't be good enough, for the general
case. We're suffering from the opposite of the Unicode bug, here: the
conflation of text and binary strings in one type.
I already knew that pack needed better documentation, and I think that this
thread seals the deal.
--
rjbs
Thread Previous
|
Thread Next