|
|
Subscribe / Log in / New account

Program names and "pollution"

Program names and "pollution"

Posted Apr 7, 2019 23:07 UTC (Sun) by jschrod (subscriber, #1646)
In reply to: Program names and "pollution" by mrshiny
Parent article: Program names and "pollution"

YES!!!

And while we're at it:
- Rename creat() to create().
- Clean up that awful abbreviation "pwd" to
have something to do with passwords instead of meaning "print working directory", as any newbie would expect.

On a serious note, it's not always as practical to change established namings even if it would be sensible.

Cheers, Joachim

PS: These two changes/gripes were mentioned by Dennis Ritchie at a conference dinner where I had the occasion to be at the same table. So please don't blame me for bringing them up. :-) :-)


to post comments

Program names and "pollution"

Posted Apr 8, 2019 9:01 UTC (Mon) by anselm (subscriber, #2796) [Link] (4 responses)

These two changes/gripes were mentioned by Dennis Ritchie

According to legend, Ken Thompson was once asked what he would do differently if he were to redo Unix from scratch. His answer was “I'd spell ‘create()’ with an ‘e’ at the end.”

OTOH, if your main means of interaction with the computer is a 110-baud teletypewriter, you may be forgiven for wanting to make every character count. In that situation, using “?” as an error message starts making a lot of sense.

Program names and "pollution"

Posted Apr 11, 2019 9:14 UTC (Thu) by mgedmin (subscriber, #34497) [Link] (3 responses)

Wasn't it a linker limitation originally? 6 characters per name, plus C name mangling prepended an underscore for some reason, so _creat was the longest you could have at the linker level.

Program names and "pollution"

Posted Apr 11, 2019 19:42 UTC (Thu) by jengelh (guest, #33263) [Link]

>Wasn't it a linker limitation originally? 6 characters per name,

There is the "localtime" call in V7 (at least whatever copy I could grab off github), which is way above 6 characters.

Program names and "pollution"

Posted Apr 11, 2019 19:51 UTC (Thu) by jengelh (guest, #33263) [Link] (1 responses)

>Wasn't it a linker limitation originally? 6 characters per name,

And as for V1, there is the "putchar" function.

Program names and "pollution"

Posted Apr 12, 2019 1:08 UTC (Fri) by neilbrown (subscriber, #359) [Link]

> And as for V1, there is the "putchar" function.

Was there?? I thought "putchar" was a macro for fputc(c, stdout), but I haven't checked V1. Rules for macro names would be different from those for linker symbols.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds