/* This bit of chicanery makes a unary function followed by a parenthesis into a function with one argument, highest precedence. */
About this quote
- What does it mean?
- The comment explains a trick that turns a unary function followed by parentheses into a function with one argument, giving it the highest precedence.
- In plain terms
- It describes a syntax hack for argument handling.
- What can you take from it?
- Be aware of language quirks that affect how functions are parsed.
Where it applies
Putting it to work
Questions to consider
- Is the benefit worth the potential confusion?
- How can you make this clearer to future readers?
Another view
Such tricks can make code harder for others to understand.
More from Larry Wall
Be consistent.
Permalink to quote #265 Does the same as the system call of that name. If you don't know what it does, don't worry about it.
Permalink to quote #266 Even if you aren't in doubt, consider the mental welfare of the person who has to maintain the code after you, and who will probably put parens in the wrong pl…
Permalink to quote #267
Related quotes
And don't tell me there isn't one bit of difference between null and space, because that's exactly how much difference there is. :-)
Larry WallLarry Wall quote #2 > (It's sorta like sed, but not. It's sorta like awk, but not. etc.) Guilty as charged. Perl is happily ugly, and happily derivative.
Larry WallLarry Wall quote #51 We toast the Lisp programmer who pens his thoughts within nests of parentheses.
Alan PerlisAlan Perlis quote #2