develooper Front page | perl.perl6.language | Postings from July 2006

Re: S29 update ready

Thread Previous | Thread Next
Aaron Sherman
July 9, 2006 08:46
Re: S29 update ready
Message ID:
Darren Duncan wrote:
> At 8:32 PM -0400 7/8/06, Joe Gottman wrote:
>> I have one minor comment about join.  You should specify its behavior 
>> when
>> it is passed an empty list.  Does it return undef or the empty string?
> I think it makes the most sense for it to return an empty string, 
> which is a reasonable degenerate case of a string-join. -- Darren Duncan

join returns a string, and requires a list. undef would indicate an 
exceptional condition (for example the list contained an object which 
could not be stringified), so I don't see why a valid (but empty) list 
would cause an undef to be returned. The later point about C<[~]()> is 
also quite helpful. I've made a note in my copy of S29, which will be 
committed to the pugs repo as soon as I have commit rights.

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