Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: How to best pass on the context / wantarray?

by GrandFather (Cardinal)
on Mar 26, 2006 at 19:06 UTC ( #539310=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How to best pass on the context / wantarray?
in thread How to best pass on the context / wantarray?

This sort of issue arrises often with respect to overloading of functions in languages like C++. In general the name of the function should say it all so that when you are reading the code you don't have to go looking elsewhere to discover subtle, but important, details about the parameters and return results.

However this can lead to "identifiers that tell a story" which is even worse - hard to type and hard to read. There is a real art to creating good identifiers!

The other aspect of this is a tension between a rich interface and a lean interface. A rich interface gets harder to use and to maintain. A lean interface tends toward ambiguity and missing functionality. This tension also plays part in the art of programming.


DWIM is Perl's answer to Gödel


Comment on Re^3: How to best pass on the context / wantarray?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-10-02 06:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls