Top 5
Julio César Carrascal Urquijo
jcarrascal at gmail.com
Thu Oct 9 14:19:04 PDT 2008
Hello Benji,
> I understand the optimization benefits of const values. I'v just never
> understood what people are talking about with "manifest" constants,
> and why they deserve to have some special keyword.
>
> I take it, from your example code, that you agree with me that there's
> no need for a "define" or "manifest" keyword...
>
> --benji
>
Someone correct me if I'm wrong.
Manifest constants grew out of the necesity of one of the winapi projects.
There are lots of constants in the win32 api and they were taking lots of
space in the resulting binary. Most projects opted to declare constants using
enum because they got replaced by the value at compile time.
For a short period there was even a manifest keyword implemented in DMD but
it got removed right before 1.0.
More information about the Digitalmars-d
mailing list