Article: Why Const Sucks
Simen Kjærås
simen.kjaras at gmail.com
Wed Mar 7 08:06:16 UTC 2018
On Tuesday, 6 March 2018 at 17:41:42 UTC, H. S. Teoh wrote:
> Yeah, Andrei has admitted before that this is probably what he
> would do today, if he were given a second chance to design
> ranges. But at the time, the landscape of D was rather
> different, and certain language features didn't exist yet
> (sorry, can't recall exactly which off the top of my head), so
> he settled with the compromise that we have today.
>
> 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.
Andrei's 'On Iteration'[0] was published 2009-11-09. Postblits
had been in the language for about a year and a half[1], and
@disable arrived early 2010[2]. Both features were probably too
new to warrant being an integral part of the design of ranges.
--
Simen
[0]: http://www.informit.com/articles/printerfriendly/1407357
[1]: https://dlang.org/changelog/2.012.html
[2]: https://dlang.org/changelog/2.040.html
More information about the Digitalmars-d-announce
mailing list