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

Re: Behavior of bitwise ops on unencountered wide characters

Thread Previous | Thread Next
From:
Sawyer X
Date:
July 12, 2017 16:51
Subject:
Re: Behavior of bitwise ops on unencountered wide characters
Message ID:
95b0a5ea-99c9-8e6c-7c12-177459872763@gmail.com


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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About