Re: Whimsical Question
Ryan Frantz wrote:
I've been coding Perl for about 18 months now and every time I see '$_'
I immediately understand its use in the context of the code
I tend to avoid $_ these days, so I'm not confronted with the question
of what to call it.
If you get a copy of Damian Conway's "Perl Best Practices" (highly
recommended) you will see this bit of wisdom (bottom of page 105):
From a readability standpoint, $_ is a terrible name for a variable,
especially for an iterator variable. It conveys nothing about the
nature or purpose of the values stores...
That's a good point. I can't really think of a good reason to ever use
$_ except that it saves the coder a few keystrokes. So, for production
code, I've adopted the practice of always using named lexical
variables, which improves readability and robustness.
But, FWIW, Damian calls the thing "dollar-underscore"
--
http://DavidFilmer.com
.
Relevant Pages
- Re: How to develop my career on software testing?
... The most important thing that any tester can do, in my view, is to ... a given context, and when they fail to identify what that context is. ... Avoid Best Practices and those who promote them; ... Bach's course online (with video lectures, slides, course notes, ... (comp.software.testing) - Re: What is the best practices when sharing a Word doc
... Is there are any best practices to avoid this, we'd all love to hear them. ... how easy you make it for the recipient to use the styles you intended for ... I'm sharing/creating a Word doc with someone outside my company (i have ... (microsoft.public.word.docmanagement) - Re: Shabbos candles (Was Re: Whats wrong with Conservative Judaism)
... :> honest thing to do, which Conservatives do, is simply avoid the fiction ... to adhere to those practices. ... (soc.culture.jewish.moderated) - Re: Shabbos candles (Was Re: Whats wrong with Conservative Judaism)
... :> honest thing to do, which Conservatives do, is simply avoid the fiction ... to adhere to those practices. ... (soc.culture.jewish.moderated) - Re: about star schema and surrogate keys
... I am not using the magical number right now in the context I described. ... You don't need to convince me about using the "real stuff", you and others already did a long time ago, and I thank you for that. ... But I still need to understand which of the practices I use for my day-to-day invoice stuff and contract management.... ... I don't need to worry about verifying and validating anything, beyond the ETL procedure, because the DWH is small enough that I drop and recreate everything every night. ... (comp.databases) |
|