Article: Why Const Sucks
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Tue Mar 6 18:20:56 UTC 2018
On Tuesday, March 06, 2018 09:41:42 H. S. Teoh via Digitalmars-d-announce
wrote:
> As they say, hindsight is always 20/20. But it wasn't so easy to
> foresee the consequences at the time when the very concept of ranges was
> still brand new.
Except that even worse, I'd argue that hindsight really isn't 20/20. We can
see a lot of the mistakes that were made, and if we were starting from
scratch or otherwise willing to break a lot of code, we could change stuff
like the range API based on the lessons learned. But we'd probably still
screw it up, because we wouldn't have the experience with the new API to
know where it was wrong. Consider all of the stuff that was improved in D
over C++ but which still has problems in D (like const). We build on
experience to make the new stuff better and frequently lament that we didn't
know better in the past, but we still make mistakes when we do new stuff or
redesign old stuff. Frequently, the end result is better, but it's rarely
perfect.
- Jonathan M Davis
More information about the Digitalmars-d-announce
mailing list