Re: [PATCH RFC 0/5] Patches to avoid reporting conversion changes.
- From
Jari Aalto <jari.aalto@cante.net>
- Date
- Apr 17, 2010, 19:32 UTC
- Message-ID
- <87eiid6fjc.fsf@jondo.cante.net>
- In-Reply-To
- <86ljcnclvu.fsf@red.stonehenge.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
Show 5 quoted lines
>>>>>> "Jari" == Jari Aalto <jari.aalto@cante.net> writes: > > Jari> if ( $OS_ERROR ) ... > > Right, but without looking, is it $OS_ERROR or $OSERROR?
I don't see any difference, because that variable is always within the close context of previous statements. The reader would consult the lines above.
And if that's the only problem, which I don't believe it is for a Perl programmer, there is also $ERRNO.
> You're trading a list of single punctuation characters, pretty > unambiguous, for things that could have been named a dozen different > ways each.
A typical Perl program used those "single puctuation variables" and they are not immediately understandable; unless you know them by heart.
They are cute for one-liners, but not suitable for maintainable programs, edited by N developers, with different backgrounds and skills.
To make the code actually readable by anyone, not just by a Perl coder breathing the language 24/7, is what software, any software would be better off.
It's akin to the opening "magic values" in a program:
100
130
140Good programmers write instead (pseudo code):
ERROR_MINOR = 100
...return ERROR_MINOR
Jari