On Tuesday, 29 September 2015 at 10:37:33 UTC, wobbles wrote:
On Tuesday, 29 September 2015 at 10:22:05 UTC, bachmeier wrote:
On Tuesday, 29 September 2015 at 05:24:49 UTC, tcak wrote:
Use Case
========
* Include libraries in a project in one step.
* Versioning is much easier. Programmer creates a library
with many modules in it. ZIP packs them, and gives a version
number to it in filename. No more changes will be made on it.
(This is my #1 reasoning)
* Work of newcomers can be eased.
This could be accomplished by including dub in the default
installation (already scheduled to happen) and then adding
something like pragma("dep", ["lib1", "lib2", "lib3"]).
For better or worse, it looks like the decision has been made
to go with Dub. I think it's a mistake, because (i) it
increases the learning curve, and (ii) the documentation was
not written for newcomers (AFAICT the way to learn is to look
at existing packages and then learn by trial and error). But
what I think doesn't matter; the decision has been made to use
Dub, so there is no chance that another approach will be taken.
How does it increase the learning curve?
Absolutely NOTHING will change when dub is included.
dmd and all your other tools will be there, and you don't have
to use dub if you don't want to.
Including dub just ensures that everyone can have access to all
the packages on code.dlang.org easily if they want them. And
also that we're all working on the same page if we want to
create new packages.
Personally I feel it's a no brainer to go with dub. Nothing to
lose and lots to gain.
Selecting a few files with mouse, then click right to create a
ZIP file cannot be compared writing a DUB package JSON file. I
would be forgetting how to write it million times, and every
time, time would be wasted.
If you say that "Hey we want to add meta data to packages", then
a simple command line flag for dmd can be added like "dmd
sign-the-package my-library-v1.0.zip". Compiler asks questions,
you answer them, it generates a sign and puts into zip package.
Only 1 command line to learn.
What is preventing DUB to use ZIP packages also?
ZIP packages in no way make any change in the language. There is
no need for pragmas even. There is no this simple (e.g. dmd
main.d library.zip) substitute for it at the moment.