Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2022-10-07 15:17 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (30 votes). Check out past polls.