All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jeff King <peff@peff.net>, Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Richard Hansen" <rhansen@rhansen.org>
Subject: Re: Re* [PATCH] doc: glossary: add entry for revision range
Date: Tue, 18 May 2021 07:28:40 -0500	[thread overview]
Message-ID: <60a3b2f8eb3b_1519872087c@natae.notmuch> (raw)
In-Reply-To: <YKNl6IAFGezjCZUf@coredump.intra.peff.net>

Jeff King wrote:
> On Mon, May 17, 2021 at 12:22:56PM -0500, Felipe Contreras wrote:
> 
> > > > If we must not use @, then I would rather use `master..mybranch`, or
> > > > something like that. HEAD seems like a technical accident. But of course
> > > > I would prefer HEAD to nothing, because at least it qualifies as an
> > > > ending point.
> > > 
> > > I agree that if the purpose is to be illustrative, using shortcuts like
> > > "an empty endpoint means HEAD" is not helpful. And likewise for "@"; if
> > > you need to have "revision range" defined, there is a good chance that
> > > you don't know about shortcuts like "@" either.
> > 
> > But they don't need to know what @ means; it's clearly a shortcut for
> > _something_, and that's all they need to know. In fact, I'd say most
> > people can quickly realize what a shorcut for it is, which is why it was
> > picked by the git project, and many Mercurial projects as well.
> 
> That's my point. It _isn't_ clearly a shortcut for something for all
> people. If you are reading the glossary entry for "revision range", you
> might not know about the ".." syntax at all. So what does:
> 
>   foo..@
> 
> mean?

An ellipsis is a common feature of both human and computer languages...

  The ... fox jumps ...

Is easily understood by most English speakers, so is a, b, c ... z.

It is used in math as well 1, 2, 3,..., 100.

It's used in computer languages, like Pascal, Modula, Oberon, Ada,
Haskell, Perl, Ruby, Swift, Kotlin, F#, and MATLAB.

  (1..10).each { |i| puts i }

I think most readers would infer that a) the starting point is at the
left of the ending point b) there's nothing after the ending point.

So what could the thing at the right of the starting point, follwing an
ellipsis, and not followed by anything else be? I think most people
would get it.

> I expect most people would figure it out. But if your point is to serve
> as documentation, especially for people who do not yet know all of the
> concepts, then why not try to reduce the chance of error as much as
> possible?

We want to minimize the chances of error... up to a point. We also want
to be useful.

Moreover, most readers don't learn at the speed they read, it takes
time, and often practice. Copy-pasting `master..@` to their terminal
will most likely work, and with any luck they'll understand it right
away.

They don't need to understand revision ranges completely when they read
the glossary, they just need a brief explanation.

[1] https://en.wikipedia.org/wiki/Ellipsis

-- 
Felipe Contreras

  reply	other threads:[~2021-05-18 12:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 20:37 [PATCH] doc: glossary: add entry for revision range Felipe Contreras
2021-05-17  7:46 ` Re* " Junio C Hamano
2021-05-17 10:30   ` Felipe Contreras
2021-05-17 11:55     ` Jeff King
2021-05-17 17:22       ` Felipe Contreras
2021-05-18  6:59         ` Jeff King
2021-05-18 12:28           ` Felipe Contreras [this message]
2021-05-17 19:26       ` Junio C Hamano
2021-05-17 21:05         ` Felipe Contreras
2021-05-18  0:51           ` Junio C Hamano
2021-05-18  1:26             ` Felipe Contreras
2021-05-18  2:08           ` Jeff King
2021-05-18  2:57             ` Junio C Hamano
2021-05-18  5:20               ` Felipe Contreras
2021-05-18  5:02             ` Felipe Contreras
2021-05-18  6:55               ` Jeff King
2021-05-18 11:42                 ` Felipe Contreras
2021-05-18 12:47                   ` Jeff King
2021-05-18 21:09                     ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60a3b2f8eb3b_1519872087c@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=rhansen@rhansen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.