What's the current state of the art for module compilation?

monkyyy crazymonkyyy at gmail.com
Wed Nov 25 00:08:35 UTC 2026


On Tuesday, 24 November 2026 at 23:34:15 UTC, user1234 wrote:
> On Tuesday, 24 November 2026 at 15:54:56 UTC, monkyyy wrote:
>> On Tuesday, 24 November 2026 at 12:39:39 UTC, user1234 wrote:
>>> [...]
>>
>> Its always been templates *vs* linkers 
>> https://forum.dlang.org/post/ikuzqeynqbdxzlyjnrvw@forum.dlang.org
>>
>> [...]
>
> Thanks for the additional explanations.
>
> Do you have an alternative solution ? Depending on how 
> realistic it would be I'd be interested to concretly test this, 
> not for D but for the my own PL.

I dont even have a complete mental model of this.

Consider a drawing directed graphs of a physics simulation, a 
brick house would be presumably almost entirely in compression, a 
suspension bridge would be almost entirely in tension. Both 
should make a dag and be easy to reason about and Im pretty sure 
they both exist.

Its not actually true, but in theory soviets were all push 
logistics and america is all pull logistics(this is a huge myth 
on the american side) and you get economists going "capitalism 
ho"; walmart is fairly pushy until you get to a warehouse then 
customers pull and they moderate demand with sells.

Theres a spectrum of acceptable solutions here; but random 
systems fail, its awfully hard to fix a brick house with a steel 
cable. I couldnt tell you what sorts of subgraphs make for 
dysfunctional system.

BUT, all push or all pull, will make a dag. So you could keep 
doubling down on templates, or have a file that is all explicit 
typing.

> Do you have an alternative solution ?

subsystems? Im optmistic of goose hotloading inside a dlang game 
engine(given its 10 mb compiler) I have a ai slop demo of 
particles. True hotloading works if you inject something in the 
runtime but the goose dev is rust and ai was uninterested in the 
suggestion and went with a safe option.

My "innate" pattern make templates poke the linker to use the 
symbol table in a useful way; `template innate(T,T 
data,discrim...){ T innate=data; }` this avoid dual context 
issues as a "super global" reference

Maybe you could mark a function as hotreloadable and data as 
"super global", and when you generate the .o in hotreload mode, 
every super global data is opened from cache and the 
hotreloadable functions are preped for dlsym?


More information about the Digitalmars-d mailing list