Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://320432]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found