Re:Idioms for the D Programming Language
by acehreli on Friday February 12, 2021 @11:26AM
(#26115341)
D's templates has always been very strong and useful compared to C++'s.
The following example is similar to C macros because it generates code as string and mixes it in as code but you can combine templates as well. This example generates a struct definition.
The following example is similar to C macros because it generates code as string and mixes it in as code but you can combine templates as well. This example generates a struct definition.
(Edit: formatting)