develooper Front page | perl.perl5.porters | Postings from July 2017

Re: Behavior of bitwise ops on unencountered wide characters

Thread Previous | Thread Next
Sawyer X
July 12, 2017 16:51
Re: Behavior of bitwise ops on unencountered wide characters
Message ID:

On 07/11/2017 01:09 PM, Karl Williamson wrote:
> On 07/10/2017 11:12 PM, Father Chrysostomos wrote:
>> Karl Williamson wrote:
>>> I don't yet have a fully formulated opinion on this, but one question I
>>> would have is "How is this different from division by 0" that people
>>> seem to deal ok with.
>> Fatal division by zero is ancient.  Fatalizing bitwise operations on
>> utf8 breaks stuff.
>> As I suggested in another thread (I seem to have been ignored), it
>> would be *much* kinder to users to make it a warning.  (Wide character
>> in blah blah blah.)  That way users who care can fatalize it, or sup-
>> press it.  You have the best of all three worlds.
> I believe I've referred to your suggestion in some thread.  It is the
> minimum we should do.  And others believe it should be deprecated.

There is a specific cost here Graham noted. This method is currently
used to determine if a variable is a number without loading "B", which
isn't cheap. While it is a simple argument of "users shouldn't care,"
serializations (like JSON) need to be able to map them to their right
type. It would be nice if there was a way to do this without B.

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