Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What Principles Drove The D Const Design?
Home
D Programming
What Principles Drove The D Const Design?
+1
vote
asked
Mar 5, 2021
in
D Programming
by
SakshiSharma
What Principles Drove The D Const Design?
#d-const-design
const-design
const-d-programming
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Mar 5, 2021
by
SakshiSharma
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.
...