[plt-dev] renaming programs in the distribution

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Tue Apr 20 13:25:39 EDT 2010

On Tue, Apr 20, 2010 at 1:08 PM, Carl Eastlund <carl.eastlund at gmail.com> wrote:
> On Tue, Apr 20, 2010 at 12:38 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>> Here are the plausible options we came up with on the IRC channel:
>>
>>  1: Keep `racket' plus a separate command tool
>>  1A: Keep `rico' as the command tool (i.e., status quo)
>>  1B: Rename `rico' to `racket-tool'
>>
>>  2: Rename `racket' to `racket-run', rename `rico' to `racket', add a
>>    `racket run' command, and let `racket' (no command) still provide a
>>    REPL
>>
>>  3: Like 2, but let `racket' guess whether its first argument is a
>>    command or a file name so that `racket <file>' often works (i.e.,
>>    the most recent proposal, but amended with `racket-run' for
>>    scripts)
>>
>> 1A is obviously best, because it fits existing conventions.
>> 1A is obviously worst, because `rico' doesn't contain "Racket".
>>
>> 1B acceptably fixes the problem with `rico' by adding "racket".
>> 1B leaves us with an unacceptably long and ugly tool name, as will
>>   anything that starts "racket".
>>
>> 2 works well, since it makes `racket' the one executable for
>>  everything.
>> 2 doesn't work, because users expect `racket <file>' to to run the
>>  file.
>>
>> 3 looks like the best combination; it almost always does what you'd
>>  expect, and the only real trouble shows up with people who put "." in
>>  their PATH, which is a typical newbie mistake that we shouldn't try
>>  to accommodate. [But I have "." in my PATH.]
>> 3 looks suspiciously like an attempt to innovate; it's unusual, it has
>>  surprising corner cases, and it interacts awkwardly with tab
>>  completion.
>
> '(1A 2 1B 3)
>
> --Carl

To throw some explanation/justification in with my vote:

I like 1A by far the best, and 3 by far the worst, and nearly flipped
a coin between 2 and 1B.  My vote should really be:
`(1A          2 1B          3)

I like 1A because it clearly separates what does what, and everything
has short names.

Versions 2 and 1B give up a short, simple name for either running
files or for compilation tasks, but are otherwise pretty clear, so
they're runners up.

Version 3 is troublesome.  It gives a short name to encourage people
to run "racket <file>" so they don't have to do long stuff... but then
punishes them if they use that to build a script and ever have a file
with a similar name to a command.  That's a bad kind of gotcha we
don't want to run our users into.  Technically we could document this
restriction prominently, but then we're just backpedaling.  We should
give our users an interface that is both simple and robust so they
only have to learn one.

--Carl


Posted on the dev mailing list.