plans for 0.0.6 release
Martin Pool
mbp at sourcefrog.net
Sat Jun 4 02:54:19 BST 2005
On 3 Jun 2005, Rusty Russell <rusty at rustcorp.com.au> wrote:
> On Wed, 2005-06-01 at 10:39 -0500, Nicholas Nethercote wrote:
> > - I think the "to" syntax is horrid -- ambiguous and thus error-prone both
> > to implement and use, and inconsistent with every other command line
> > option in the universe. "4 to 5" might look nice and Python-ish, but
> > Python-style syntax doesn't mix well with shell syntax.
> >
> > - I think using '-' as a range operator is bad. '-' is already used
> > to introduce options (ie. -r), and also in some revision names, so why
> > overload it with another meaning? It just makes command lines harder to
> > parse (for humans and machines). I mentally parse "-r4-5" as "-r4 -5".
A worse case is '-r-4' vs '-r -4'.
> We went down the ":" path in netfilter for port ranges, and I've
> regretted it ever since.
It seems it's particularly confusing there because colon is already
mentally associated with HOST:PORT syntax. Do you think that's the main effect?
> It is the most common mistake I make in
> writing rules.
What happens? You write 20-21 when you should say 20:21?
> There is no parsing ambiguity when combined with the "<namespace>:"
> syntax, which I think everyone quite likes.
>
> > - I quite like ':' as a range operator, it works fine in Subversion. But
> > if ':' has another use in revision names, then avoiding overloading
> > it is a good idea.
>
> : has merit because it is used in CVS and svn. CVS also uses :: to
> indicate a collapsed range in some cases. Two -r options are used in
> RCS.
Two -r options would nicely avoid the debate, and they've been
proposed in some patches. I think the main drawback is they can't
distinguish "20-" and "-20" and "20".
> > - This leaves '..' which seems best: it's intuitive, easy to read, easy
> > to implement and doesn't have any prior meaning, AFAIK. And I don't
> > recall anyone else complaining about it.
>
> Unfortunately, this is neither intuitive nor established. My preference
> would be to have a canonical form of "-r A-B" or "-r A -r B" but also
> allow svn-style : ranges for simple numeric ranges (which otherwise
> would be a clear syntax error and just irritate svn users).
On the whole I think '-r A-B' is right, perhaps with ':' supported
where it doesn't clash with the prefix form for dates and so on.
--
Martin
More information about the bazaar
mailing list