develooper Front page | perl.perl5.porters | Postings from February 2015

RFC: What should error return be in Unicode::UCD 5.22 and longterm

Thread Next
From:
Karl Williamson
Date:
February 8, 2015 17:56
Subject:
RFC: What should error return be in Unicode::UCD 5.22 and longterm
Message ID:
54D7A349.5020408@khwilliamson.com
The documentation of Unicode::UCD says the functions return undef for 
errors.  Actually, mostly it does this for scalar context, and an empty 
list for list context, as recommended by Damian.

Aaron disagrees with that recommendation
http://aaroncrane.co.uk/talks/calamitous_context/paper.html

Basically Aaron's argument comes down to, correct me if I misstate this, 
that you can't get a return that works right for all circumstances, and 
Damian's solution favors a rarer case at the expense of a more common case.

My position is that the goal should be that Unicode::UCD functions 
should all behave consistently with each other in this regard.  If the 
documentation and behavior matched, we would just leave it at whatever 
that was, saying the churn wasn't worth it.

But since the documentation and behavior disagree, what should we do?
Short term for 5.22, and long term, if different?

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