Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

returns an empty list, oh my (was: Re: Re: Re: fethrow_array return value)

by ysth (Canon)
on Jan 11, 2004 at 06:07 UTC ( #320432=note: print w/replies, xml ) Need Help??


in reply to Re: Re: fethrow_array return value
in thread fetchrow_array return value

Also, does an empty list always evaluate to false?
I am delighted at finding myself inconsistent! I feel passionately that "returns an array" is bad documentation, but "returns an empty list" doesn't make me blink twice, even though from a language-semantics point of view, a routine in scalar context cannnot return an empty list, and return () will in fact be an undef result (and hence false).

Do any others find their brains working this way? Or would everyone else consider "returns an array" and "returns an empty list" equally good or bad?

  • Comment on returns an empty list, oh my (was: Re: Re: Re: fethrow_array return value)
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://320432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2019-08-21 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?