!0
Nicholas Clark
nick at ccl4.org
Thu Feb 12 21:55:21 GMT 2009
On Thu, Feb 12, 2009 at 10:41:01PM +0100, Abigail wrote:
> On Thu, Feb 12, 2009 at 09:59:47AM -0800, David Alban wrote:
> >
> > being a fan of Readonly, i like doing:
> >
> > Readonly my $EMPTY_STRING => q{};
> >
>
> What's next?
>
> Readonly my $ZERO => 0;
> Readonly my $ONE => $ZERO + 1;
Work code has a lot of
use constant C_TRUE => 1;
use constant C_FALSE => 0;
written by people fortunately long gone.*
Whilst work code works, which implies "it ain't broke, so dont' fix it",
work is kind enough to permit me the time to work on obliterating crimes
against clarity such as the above.
Also, said authors like the style q{}.
I don't see what the advantages of it are. I can see two disadvantages
1: It's one more character of typing over the "obvious" ''
2: My brain triggers on "q" constructs, and treats them as something
interesting, exceptional, and worthy of note. It's annoyed when it turns
out that it's nothing more than a non-interpolating string, and regards
such use of q{} as an irritating distraction, which may cause it to miss
something nearby that is worthy of note.
Nicholas Clark
* boilerplate comments and endemic copy&paste are some of their other crimes.
Mind you, if they hadn't done this, I wouldn't have been able to refactor
away 25% of the total Perl code base with no loss of functionality. And I
haven't finished yet. Hateful software euthanasia is such fun.
More information about the london.pm
mailing list