git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
    140
Good programmers write instead (pseudo code):
    ERROR_MINOR = 100
    ...
    return ERROR_MINOR
Jari
Previous: Randal L. SchwartzNext: Randal L. Schwartz
Message 13 of 18 in “Patches to avoid reporting conversion changes.”
  1. 0/5 Patches to avoid reporting conversion changes.Henrik Grubbström (Grubba), Apr 16, 2010
  2. 1/5 sha1_file: Added index_blob().Henrik Grubbström (Grubba), Apr 16, 2010
  3. 2/5 cache: Added ce_norm_sha1() and related cache_entry fields.Henrik Grubbström (Grubba), Apr 16, 2010
  4. 3/5 cache: Added index extension "NORM".Henrik Grubbström (Grubba), Apr 16, 2010
  5. 4/5 reachable: Made the gc aware of the ce_norm_sha1.Henrik Grubbström (Grubba), Apr 16, 2010
  6. 5/5 cache: Use ce_norm_sha1().Henrik Grubbström (Grubba), Apr 16, 2010
  7. Junio C HamanoApr 20, 2010
  8. Henrik GrubbströmApr 20, 2010
  9. Junio C HamanoApr 20, 2010
  10. Henrik GrubbströmApr 25, 2010
  11. Jari AaltoApr 16, 2010
  12. Randal L. SchwartzApr 16, 2010
  13. Jari AaltoApr 17, 2010
  14. Randal L. SchwartzApr 17, 2010
  15. Sverre RabbelierApr 17, 2010
  16. Jakub NarebskiApr 17, 2010
  17. Sverre RabbelierApr 17, 2010
  18. Randal L. SchwartzApr 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.