Skip to content
quotesby

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

  • writing DSLs
  • code readability issues

Putting it to work

  • use explicit parentheses
  • document such tricks

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

  1. Be consistent.

    Permalink to quote #265
  2. 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
  3. 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

  1. 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
  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
  3. We toast the Lisp programmer who pens his thoughts within nests of parentheses.

    Alan PerlisAlan Perlis quote #2