News for hackers. Stuff that matters.
Re:Idioms for the D Programming Language by vidugavia on Friday February 12, 2021 @01:11AM (#26111167)
Is the lack of incremental compilation aproblem with dub or with D compiler in general?
Re:Idioms for the D Programming Language by Doxin on Friday February 12, 2021 @03:13AM (#26111638)
It's a problem with dub. The D compiler operates basically exactly like a C compiler would as far as I'm aware.

Note that in most cases an incremental build isn't really required for D because for moderately complex projects you're often limited by linking speed, not compiling speed.

Re:Idioms for the D Programming Language by moonchild on Friday February 12, 2021 @05:31PM (#26119305)
Both. Incremental compilation is possible to an extent, and reggae[0] does it. However, due to the semantics of d imports and templates, compiling a module will require at least cursory parsing and semantic analysis of all the modules it imports. Meaning that for a binary with a single entry point, modifying pretty much any module will require recompilation of the top-level module, which means there's a certain degree of incrementality you can never reach.

0. https://github.com/atilaneves/reggae

Re:Idioms for the D Programming Language by p0nce on Friday February 12, 2021 @06:00AM (#26112355)
dub does incremental builds.
Re:Idioms for the D Programming Language by moonchild on Friday February 12, 2021 @05:32PM (#26119314)
On a per-file basis? Afaik it works with package granularity, so if you change one line of a package, you're SOL.
Re:Idioms for the D Programming Language by p0nce on Monday February 15, 2021 @09:50AM (#26143244)
Per-package translation unit are faster than per-file translation units.