Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Use of wantarray Considered Harmful

by tilly (Archbishop)
on Dec 20, 2008 at 03:42 UTC ( [id://731719]=note: print w/replies, xml ) Need Help??


in reply to Use of wantarray Considered Harmful

Hear, hear. A general programming principle is that interfaces should be simple if possible. Context makes all interfaces more complex. Furthermore I find that my decisions about context are often the part of my interface that ages least well.

For those who argue about built-ins, there is the concept of amortized complexity. You learn a built-in then get to use it day after day for a long time. When you amortize the cost of learning it over the use you get, a lot of complexity can be justified for minor convenience. But little user code gets amortized that much, making it harder to justify any complexity there.

  • Comment on Re: Use of wantarray Considered Harmful

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://731719]
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-19 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found