On Sunday, 31 May 2015 at 23:56:42 UTC, Idan Arye wrote:
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...

It would also make it easier to integrate the tools into an IDE. Yeah, definitely, it'd be nice to have a one-stop executable (similar to dub). I like `dlang`. E.g. to build with GDC:

dlang build release gdc

Maybe (on Windows) an option for DLLs and linking to C libraries would be nice too.

Reply via email to