Talk on D at DORS/CLUC
RazvanN
razvan.nitu1305 at gmail.com
Mon May 13 09:10:58 UTC 2024
On Sunday, 12 May 2024 at 01:47:51 UTC, Walter Bright wrote:
> Here's one I like:
>
> https://github.com/dlang/dmd/blob/master/compiler/src/dmd/backend/var.d#L188
>
> This table used to be generated by a separate C program. The C
> program would build the table, and write a .c file with the
> initializer for the table.
>
> The code now demonstrates a lambda that is executed at compile
> time to generate the table. There are several examples in the
> file.
>
> 1. there is no need for constexpr
> 2. the lambda code is not emitted to the executable
>
> The cool thing is you've got the full power of D available to
> generate static tables.
Thanks everyone for your suggestions. I will how I can put
everything together in a 30 min talk. I'll keep you updated on
how it went!
Regards,
RazvanN
More information about the Digitalmars-d
mailing list