That said, for more complex results, you'd typically load a serialization on start.
I can see the value in this tool, but there must be a fairly limited niche which is too expensive to just have as static and run on start-up and cache, but not so large you'd prefer to just serialize, store and load.
It also needs to be something that is dynamic at compile time but not at runtime.
So it's very niche, but it's an interesting take on the concept, and it looks easier to use than the default source generators.
Not terribly niche. All config that isn’t environment-specific and is used in inner loops or at startup. It’s even got a test for serialised values so can be used to speed your case up:
I think Zig really shines here: https://ziglang.org/documentation/master/#comptime
C# meta programming game is strong. Source generators are :chefs_kiss:
This seems like the kind of feature that should be built into MSBuild.
It's a lot less ergonomic but there are source generators in C# :
https://devblogs.microsoft.com/dotnet/introducing-c-source-g...
That said, for more complex results, you'd typically load a serialization on start.
I can see the value in this tool, but there must be a fairly limited niche which is too expensive to just have as static and run on start-up and cache, but not so large you'd prefer to just serialize, store and load.
It also needs to be something that is dynamic at compile time but not at runtime.
So it's very niche, but it's an interesting take on the concept, and it looks easier to use than the default source generators.
Not terribly niche. All config that isn’t environment-specific and is used in inner loops or at startup. It’s even got a test for serialised values so can be used to speed your case up:
https://github.com/sebastienros/comptime/blob/main/test/Comp...
But you need to be sure you won’t want to change without compiling.
Also t4 templates before that for at least a decade
So it's like C++ consteval?