Notes for DLang maintainers

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 28 10:49:31 PST 2017


On Tue, Feb 28, 2017 at 06:24:45PM +0000, Russel Winder via Digitalmars-d wrote:
> On Tue, 2017-02-28 at 09:18 -0800, H. S. Teoh via Digitalmars-d wrote:
> > […]
> 
> > 30-year-old typographical infelicities like 'grep'.)
> 
> Surely typing grep is far easier than get_regular_expression_print

It only makes sense to those who already know what it means.  A typical
syndrome of UI's designed by programmers.

It should have been something more immediately descriptive, like 'find'
or 'match'.  But it's too late for that now, as 'find' now has a
different meaning thanks to yet another historical accident.

And don't get me started on `awk` or `sed`. Or `getty`.  As they say,
ASCII stupid question, getty stupid ANSI. :-P


[…]
> > Curious to see what you come up with.  AIUI, git is already
> > providing the 'porcelain' interface by default, so we see today is
> > already far better than what Linus used to use. (I dread to imagine
> > how one might use git back then!  I'll bet it's like piloting an
> > airplane by coding in machine language in real-time. :-P)  Let's see
> > if you can come up with something even better! ;-)   (Though I'll
> > admit it may be easier than it sounds. But still... the only sane
> > way to use git is to understand its innards -- y'know, all that DAG
> > stuff -- 'cos it simply doesn't make any sense otherwise.)
> 
> Despite 10 years of trying to make things better the Git command line
> is still dreadful and the perpetrators should apologies to the world.
> Sadly Mercurial and Bazaar have lost (thought they are still used), and
> Git is the winner. Programmers just have to use Git. Despite being crap
> the Git command line can just about be mastered enough to be used, and
> programmers should just do that.

I make no defense for the weirdness of git's current interface.  There's
a lot of asymmetry and unexpected exceptions, that only make sense in
retrospect (and sometimes not even that). Such as `git checkout -b` for
creating a new branch, but `git branch -d` for deleting a branch. Or
`git checkout` for *both* replacing a file with the last committed
version and for switching branches.

But that's what you get for an interface that's evolved rather than
designed.


> Blogs showing cute tricks with Git, or anything involving ^^^^^^^HEAD
> should be totally ignored by all right thinking people. The trick is
> to use the simple stuff, use it well, and ignore all the tricks, and
> all the people getting high on cute tricks.
[...]

Actually, all expectation of git being anything even remotely resembling
a traditional version control system is not thinking right. The only
sane way to make any sense of it whatsoever is to think on *its* terms,
i.e., think in terms of DAG manipulations.  Trying to impose (or think
in terms of) foreign concepts inherited from traditional VCS's
inevitably leads to frustration, annoyance, and hair loss.

For instance, the only way git "branches" even begin to make any sense
at all is when you think of them as mere pointers to certain DAG nodes,
rather than branches in the traditional sense of the word.  I.e., as
pure DAG manipulations and nothing more. Attaching any further meaning
to it which isn't there only leads to confusion and incomprehension.
(And usually also hair/code loss or your DAG turning into an
11-tentacled monster on you.)

In that sense, it's a *good* thing the git interface is so weird: it
forces you to confront the fact that you're dealing not with a VCS (in
the traditional sense of the word), but with a DAG manipulation system.
One that happens to have useful idioms that resembles a VCS of sorts,
but nonetheless at its heart still a mere DAG manipulation system.
Trying to use it as anything else or in any other way amounts to nothing
more than a cargo cult, with about the same level of effectiveness.


T

-- 
Turning your clock 15 minutes ahead won't cure lateness---you're just making time go faster!


More information about the Digitalmars-d mailing list