+1 vote
in D Programming by
What Principles Drove The D Const Design?

1 Answer

0 votes
by

Below are the Principles Drove The D Const Design

  • It will be mathematically sound. That means there are no legal escapes from it.
  • Any type can be wrapped in a struct and the resulting struct can still exhibit the same const behavior - in other words, no magic behavior for certain types.
  • Const behavior will be transitive.
  • Const behavior for type T will be equivalent for all types T.
...