Re: [PATCH RFC 0/5] Patches to avoid reporting conversion changes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



merlyn@xxxxxxxxxxxxxx (Randal L. Schwartz) writes:

>>>>>> "Jari" == Jari Aalto <jari.aalto@xxxxxxxxx> 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
    140

Good programmers write instead (pseudo code):

    ERROR_MINOR = 100
    ...


    return ERROR_MINOR

Jari
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]