What's the current state of the art for module compilation?
user1234
user1234 at 12.de
Tue Dec 1 10:42:45 UTC 2026
On Wednesday, 25 November 2026 at 00:08:35 UTC, monkyyy wrote:
> 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?
I see now. I think that you are lost into the static and dynamic
languages "schism". You should understand that the time gain on
static linking would then be lost during dynamic loading,
shouldn't you ?
I mean at some point you have to call something. If that thing is
statically linked, it's fast. Othertwise you have to resolve the
address during the run-time. Plus, for every each call ? without
using an indirection ? Do you want the performances of an
interpreted languages while it is statically compiled ? Just
"comon". You have python, TS, for that.
More information about the Digitalmars-d
mailing list