Re: Heads up: `rumpbake' introduced, toolchain renaming imminent

  • From: Antti Kantee <pooka@xxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Mon, 01 Jun 2015 22:17:28 +0000

On 01/06/15 21:31, Martin Lucina wrote:

Since -T and -o are mandatory parameters (i.e. unlike with cc they don't
have default values), why are they not simply the first and second
non-option arguments?

No objections heard, so removed the flags. Usage is now always
"rumpbake target output file [file ...]"

Sorry, travelling...

I do have an objection, which is that if we don't keep them as flags, then
we can't easily make them optional later without the change getting really
confusing for users.

Yes, it is completely true that they cannot be made optional later, but that's not relevant unless there's a case for why they should be optional.

How do you propose that they are made optional without it getting confusing? What will the default board config be? What will the default output file be? Using env/conffile is a non-starter, since it adds magic side effects. If someone is too lazy to type, they can write their own wrapper which does exactly what they want instead of us guessing poorly what they want. Lampson's recipe "leave it to the client" applies also here.

The flipside of your argument is that the flags cannot be removed if they are discovered useless. We can't design interfaces on the principle of "this might be useful some day", except in the case that the additional freedom comes with no cost. There needs to be at least a reasonable suspicion for a case to justify interface clutter. I can't see a case for target/output having widely applicable default values. If someone has one, present it so that the rest of us can be wiser.

And technically, cc has a default for -o, it's 'a.out'.

Yes, I know that cc has one. That's why I wrote "*unlike* with cc". (And technically, it's not 'a.out' if you also specify -c or -S or -E or probably some other flags, which just goes to show how easy it is to go wrong with optional values)

Other related posts: