public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jari Aalto <jari.aalto@cante•net>
To: merlyn@stonehenge•com (Randal L. Schwartz)
Cc: git@vger•kernel.org
Subject: Re: [PATCH RFC 0/5] Patches to avoid reporting conversion changes.
Date: Sat, 17 Apr 2010 22:32:39 +0300	[thread overview]
Message-ID: <87eiid6fjc.fsf@jondo.cante.net> (raw)
In-Reply-To: <86ljcnclvu.fsf@red.stonehenge.com> (Randal L. Schwartz's message of "Fri, 16 Apr 2010 11:06:45 -0700")

merlyn@stonehenge•com (Randal L. Schwartz) writes:

>>>>>> "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
    140

Good programmers write instead (pseudo code):

    ERROR_MINOR = 100
    ...


    return ERROR_MINOR

Jari

  reply	other threads:[~2010-04-17 19:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-16 16:09 [PATCH RFC 0/5] Patches to avoid reporting conversion changes Henrik Grubbström (Grubba)
2010-04-16 16:09 ` [PATCH RFC 1/5] sha1_file: Added index_blob() Henrik Grubbström (Grubba)
2010-04-16 16:09 ` [PATCH RFC 2/5] cache: Added ce_norm_sha1() and related cache_entry fields Henrik Grubbström (Grubba)
2010-04-16 16:10 ` [PATCH RFC 3/5] cache: Added index extension "NORM" Henrik Grubbström (Grubba)
2010-04-16 16:10 ` [PATCH RFC 4/5] reachable: Made the gc aware of the ce_norm_sha1 Henrik Grubbström (Grubba)
2010-04-16 16:10 ` [PATCH RFC 5/5] cache: Use ce_norm_sha1() Henrik Grubbström (Grubba)
2010-04-20  7:25   ` Junio C Hamano
2010-04-20 15:39     ` Henrik Grubbström
2010-04-20 19:12       ` Junio C Hamano
2010-04-25 11:25         ` Henrik Grubbström
2010-04-16 18:02 ` [PATCH RFC 0/5] Patches to avoid reporting conversion changes Jari Aalto
2010-04-16 18:06   ` Randal L. Schwartz
2010-04-17 19:32     ` Jari Aalto [this message]
2010-04-17 19:34       ` Randal L. Schwartz
2010-04-17 22:07         ` Sverre Rabbelier
2010-04-17 22:32           ` Jakub Narebski
2010-04-17 22:47             ` Sverre Rabbelier
2010-04-17 22:58               ` Randal L. Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eiid6fjc.fsf@jondo.cante.net \
    --to=jari.aalto@cante$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=merlyn@stonehenge$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox