Hacker News new | ask | show | jobs
A Pattern for Head-mutable Structures in D (dlang.org)
12 points by aldacron 2178 days ago
1 comments

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.

You're right - thank you for this constructive criticism. The post was originally written as a DIP (D Improvement Proposal), and arguably suffers a little because of that.
Haha. Honestly I thought this was some PL research paper. That was lot of information (which is good). It might be worthwhile to point out on the blog which DIP this was. Thanks.