Hi Sawyer,

On Mon, 7 Nov 2011 13:36:58 +0200
sawyer x <xsawy...@gmail.com> wrote:

> On Mon, Nov 7, 2011 at 10:07 AM, Shlomi Fish <shlo...@shlomifish.org> wrote:
> 
> >
> > You shouldn't call lexical variables "$a" and "$b":
> >
> 
> That was a completely pointless comment, Shlomi.
> 
> He's trying to showcase an action on two objects that have the exact same
> level of importance and relevance. Calling them $a and $b is the same as
> $homer and $marge or $object1 and $object2 or $first and $second or
> anything of that order.
> 
> This is a case where $a and $b makes absolute sense. It is also the same
> case as Perl's sort() function that uses $a and $b to indicate two values
> of the same importance.
> 

The problem is that using my $a and my $b will prevent the built-in $a and $b
from being used and as a result is a bad idea. We should make sure that
synopses and other code excerpts in the documentation of Perl modules reflect
the Perl best practices, because less clueful people may be tempted to duplicate
them in their own code. And then they go to online forums and ask us why their
code is broken.

So the lexical "$a" and "$b" here should be replaced with something less
dangerous.

> We honestly don't have to comment on *everything* people say and do.
> (and I probably shouldn't have commented on what you said either, so
> apologies for that)
> 

Well, I hope I didn't also make the same mistake (again).

Regards,

        Shlomi Fish

> Have a good day,
> s.



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
The Case for File Swapping - http://shlom.in/file-swap

You name it — COBOL does not have it.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Reply via email to