On 2005-11-04, at 23:07, David Roundy wrote:

The key is that the a user-friendly input to darcs is almost trivially machine-friendly (as long as it comes through stdin). Machine- friendly
input is a subset of human-friendly input.

Assuming of course that nobody changes letter shortcuts on darcs
questions to make it more userfriendly. This would ofcourse break
existing applications.

Changing letter shortcuts is very human-unfriendly. We aren't as flexible as computers when it comes to supporting different interfaces. There are a few rarely-used keys that we might change (like the recently introduced 'c' for "count the changes"), but it's highly unlikely we'll change any of the main commands. And in the process of extending the interface so that it can be used effectively by machines we'd formalize which commands should be
kept fixed.

There could be a character such as ':' that would trigger a "machine- input" or "long-input" mode, which accepts long command names which never change. So something like this:

Shall I record this patch? (etc.): :accept
          (user input starts here) ^

Other commands could be :reject, :wait, :rejectfile, :acceptfile, :rejectremaining, :acceptre maining, and so on. This would allow the human shortcuts to change whilst maintaining compatibility with scripts.


When machine-friendliness is implemented (with whichever method), one thing _must_ be present right from the beginning: a version flag. That is, 'darcs record --command-set=1'. This will allow two things: 1) The command set can be changed in the future whilst retaining backward compatibility with existing scripts (by keeping compatibility code for old command sets). 2) Backward compatibility could be broken (I'm thinking very far into the future), and asking for an old command set would generate an error. This is obviously infinitely more desirable than accepting some old commands and silently failing on others.



Jonathon Mah
[EMAIL PROTECTED]



_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users

Reply via email to