Entry point a la "git" or "go"
Idan Arye via Digitalmars-d
digitalmars-d at puremagic.com
Sun May 31 16:56:40 PDT 2015
On Sunday, 31 May 2015 at 23:11:24 UTC, Andrei Alexandrescu wrote:
> There's this recent trend seen with git and go - all tooling is
> entered by a single command.
>
> Are there advantages to doing the same for our toolchain?
> (Consider it'll include things such as dub, dfix, and dformat
> in the future.) Something like "dc", a program that parses the
> command line and dispatches it to the appropriate tool(s).
>
> How would this add value to our toolchain?
>
>
> Andrei
This is creating a "namespace", which has all sorts of benefits:
1) Easier help - `dc --help` shows basic description of all
subtools.
2) Better names - since all tools reside in the `dc` command
anyways they can have names based on what they do and not some
acronym or a made-up project name. Instead of `dub` and `rdmd` we
can have `dc build` and `dc run-script` - which convey what they
do right away.
3) Containment - since all tools are under `dc`, and assuming
`dc` can have some general-purpose flags, it's easier to build
wrappers around it. You've mentioned git - there is a Git plugin
for Vim called Fugitive that in addition for implementing
commands that give special treatment wrapping to some Git
commands, also offers the general `:Git` command, that can run
any Git command you like and sets the general `git` flags to play
better with Vim. It can do so because all Git commands start with
`git `. Not sure yet how this property of
single-entry-point-tool-chain will benefit D though - it depends
on what the general flags for `dc` will be...
More information about the Digitalmars-d
mailing list