|
|
|
|
|
by arunc
2187 days ago
|
|
The author is an expert D programmer and the post is too deep for beginners and average users of D to understand. Here are the words from the OP from Reddit. Ideally this should've been the first one/two paragraphs of this post. https://www.reddit.com/r/programming/comments/hfkq5e/a_patte... A common complaint about D's const is its transitivity makes it hard to use, and the blog post attempts to improve this situation by giving user-defined types the same power that built-in types have. Currently, the way to work around the issue is to simply not use const and instead rely on convention. Essentially, you'll write the same code in both cases, but currently the compiler gives you no help. I want the compiler to enforce these things, and I believe almost every D project could benefit from this. |
|