Aaron Sherman skribis 2005-04-17 18:23 (-0400):
> On Fri, 2005-04-15 at 18:04 +0200, Juerd wrote:
> > >   throwawaytmpvar $sql = q{...};
> > >   throwawaytmpvar $sql = q{...};
> > I like the idea and propose "a", aliased "an" for this.
> Too short. 

There is a rule of thumb, I don't know who came up with it, that says
that the length of a variable name should be proportional to its scope.
This works well, very well. The same principle can be applied to the
declaring operator, and holds for my/our already.

The usual idiom for these throwaway variables is to use blocks. The
reason to want a different way to write this, I thought was wanting to
type less, especially because it's repeated throughout code.

>       * Robs that identifier from any future possible use

That's with every identifier, and if the function it provides is good
enough, this cannot be considered a problem, or we can no longer invent
any new keyword that's both short and powerful.

>       * Creates incentive to use this over "my"

This is true, and the reason I now prefer a warningless my to a/an. For
this I like Larry's suggestion to use "ok", so you get "ok my $foo =
...;". Again, a short keyword, but its power warrants it, IMO.

Even if this does mean (and it does) we need something else for unit
tests.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Reply via email to