D-lighted, I'm Sure

JN 666total at wp.pl
Fri Jan 18 18:59:59 UTC 2019

On Friday, 18 January 2019 at 18:48:00 UTC, H. S. Teoh wrote:
> I'm also not a big fan of dub, but I'm in the minority around 
> these parts.  Having grown up on makefiles and dealt with them 
> in a large project at my day job, I've developed a great 
> distaste for them, and nowadays the standard build tool I reach 
> for is SCons.  Though possibly in the not-so-distant future I 
> might start using something more scalable like Tup, or Button, 
> written by one of our very own D community members. But for 
> small projects, just plain ole dmd is Good Enough(tm) for me.

The trick with makefiles is that they work well for a single 
developer, or a single project, but become an issue when dealing 
with multiple libraries, each one coming with its own makefile 
(if you're lucky, if you're not, you have multiple 
CMake/SCons/etc. systems to deal with). Makefiles are very tricky 
to do crossplatform, especially on Windows, and usually they 
aren't enough, I've often seen people use bash/python/ruby 
scripts to drive the building process anyway.

The big thing dub provides is package management. Having a 
package manager is an important thing for a language nowadays. 
Gone are the days of hunting for library source, figuring out 
where to put includes. Just add a line in your dub.json file and 
you have the library. Need to upgrade to newer version? Just 
change the version in dub.json file. Need to download the problem 
from scratch? No problem, dub can use the json file to download 
all the dependencies in proper versions.

More information about the Digitalmars-d-announce mailing list