develooper Front page | perl.perl5.porters | Postings from May 2010

Re: Backwards compatibility breakage proposal for charnames::viacode

Thread Previous
From:
demerphq
Date:
May 30, 2010 10:27
Subject:
Re: Backwards compatibility breakage proposal for charnames::viacode
Message ID:
AANLkTilCzn5-GpFJ2NjnmhX4vtoS0HP4IIxISdzWrydW@mail.gmail.com
On 30 May 2010 19:06, demerphq <demerphq@gmail.com> wrote:
> On 30 May 2010 00:22, karl williamson <public@khwilliamson.com> wrote:
>> viacode is supposed to return Unicode's name for the input ordinal.
>>
>> The Unicode standard says that the name for any unassigned code point is the
>> empty string.  Perl returns undef instead.  My view is that we should change
>> to meet the standard, and return undef only for input above the maximum that
>> Unicode allows (0x10FFFF).
>>
>> But since there is a possibility this could break existing code, I thought I
>> had better get others' opinions.  In the past, the Standard has had
>> precedence on issues like this.
>
> Seems to me like this would be a position they would take that would
> be portable across any language, and that for languages that have a
> concept of "undefined" it doesnt make much sense.
>
> For instance, would they make this suggestion for storing the table in
> an SQL database that supports NULL?

Thinking about this more, I think we are already compliant since
'undef' behaves like an empty string in string context, and any
warnings from using it are purely voluntary.

So unless the spec prohibits implementations from warning about using
such values, which seems unlikely, IMO what we do is the right thing.

cheers,
Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous


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