in reply to Re^2: what is the meaning of ();
in thread what is the meaning of ();
Are you saying that following coding style documents is cargo-cult programming? I tend to think that one should follow coding guidelines, no matter how stupid. If they suck, change the guidelines or change your job.
I'm sure you meant that it could be cargo-cult OR it could be adherence to a 'no defaults' style guideline/preference. The only way to know for sure would be to ask the original programmer why he wrote the code that way.
Consider the following code:
my $foo = undef;
The initialization to undef totally unnecessary, but it does communicate an idea: $foo really should be undef, it's not just an oversight.
While I don't use either unnecessary initialization, I don't see them as harmful.
Despite my personal preferences, I can see why someone would choose to explicitly initialize ALL their variables. It's not a bad habit to be in.
I guess the main thing I am trying to say is, don't be in too much of a rush to call something cargo-cult. What we have here could be CC code or it could be the result of a decision based on some painful lessons.
TGI says moo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: what is the meaning of ();
by MidLifeXis (Monsignor) on Jul 27, 2008 at 02:01 UTC | |
|
Re^4: what is the meaning of ();
by Yunus (Novice) on Jul 27, 2008 at 17:51 UTC |