Program names and "pollution"
Program names and "pollution"
Posted Apr 2, 2019 20:16 UTC (Tue) by mrshiny (guest, #4266)Parent article: Program names and "pollution"
Posted Apr 2, 2019 20:26 UTC (Tue)
by ntnn (guest, #109693)
[Link] (1 responses)
Also it's not hard to rename commands. Rename them in one major version, provide the old ones as symbolic links and display warnings when they're called by their old names that they're going to be unavailable in the next version.
Will it break some scripts somewhere? Yeah. But then it's the fault of the admins running it for upgrading a major version without checking the changelog.
Posted Apr 2, 2019 20:29 UTC (Tue)
by ntnn (guest, #109693)
[Link]
Posted Apr 3, 2019 8:18 UTC (Wed)
by kandreas (guest, #131050)
[Link] (9 responses)
Posted Apr 3, 2019 10:15 UTC (Wed)
by lamawithonel (subscriber, #86149)
[Link] (4 responses)
1: Move existing commands to pg_* and create symlinks.
Posted Apr 3, 2019 10:24 UTC (Wed)
by lamawithonel (subscriber, #86149)
[Link]
Posted Apr 3, 2019 15:19 UTC (Wed)
by kh (guest, #19413)
[Link] (1 responses)
Posted Apr 4, 2019 13:25 UTC (Thu)
by lamawithonel (subscriber, #86149)
[Link]
Posted Apr 3, 2019 17:19 UTC (Wed)
by rotty (guest, #14630)
[Link]
This build system feature, though, would probably helpful on source-based systems, though I'm not familiar with those.
Posted Apr 7, 2019 0:13 UTC (Sun)
by rossmohax (guest, #71829)
[Link] (3 responses)
Posted Apr 9, 2019 1:40 UTC (Tue)
by k8to (guest, #15413)
[Link] (2 responses)
Posted Apr 9, 2019 15:16 UTC (Tue)
by nix (subscriber, #2304)
[Link] (1 responses)
Posted Apr 9, 2019 23:35 UTC (Tue)
by karkhaz (subscriber, #99844)
[Link]
Posted Apr 7, 2019 23:07 UTC (Sun)
by jschrod (subscriber, #1646)
[Link] (5 responses)
And while we're at it:
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. :-) :-)
Posted Apr 8, 2019 9:01 UTC (Mon)
by anselm (subscriber, #2796)
[Link] (4 responses)
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.
Posted Apr 11, 2019 9:14 UTC (Thu)
by mgedmin (subscriber, #34497)
[Link] (3 responses)
Posted Apr 11, 2019 19:42 UTC (Thu)
by jengelh (guest, #33263)
[Link]
There is the "localtime" call in V7 (at least whatever copy I could grab off github), which is way above 6 characters.
Posted Apr 11, 2019 19:51 UTC (Thu)
by jengelh (guest, #33263)
[Link] (1 responses)
And as for V1, there is the "putchar" function.
Posted Apr 12, 2019 1:08 UTC (Fri)
by neilbrown (subscriber, #359)
[Link]
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.
Program names and "pollution"
Once that one rolls around remove the symlinks and you're done.
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
1a: (optional) Create a central binary with sub-commands, à la `git` or `systemctl`, and move all the pg_* commands under that. Replace symlinks with shim binaries.
2: Start printing a warning if commands are called by their legacy names, but allowi users to silence the warnings with an option flag.
3: Create a build path to build only the symlinks/shims, and a non-default way to build without them. This gives packagers an easy way to package them separately, and users a way to test without them. It also gives packagers some control over how and when they remove the symlinks/shims.
4: Make deprecation warning silence flags NOOP.
5: Inspired by rfunk's comment, move the symlinks/shims out of $PATH, to something like /usr/share/postgres/bin, and declare them unsupported. Inform users that they can add the new directory to their $PATH if they really need them for some reason, but that you won't accept bug reports against them. Maintain this for at least another major release, possibly several more.
6: Rejoice when our AI overloads remove all the symlinks/shims.
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
- 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.
Program names and "pollution"
These two changes/gripes were mentioned by Dennis Ritchie
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"
Program names and "pollution"