Shout out to D at cppcon, when talkign about ranges.
Ulrich Küttler via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 6 15:38:59 PDT 2015
On Tuesday, 6 October 2015 at 07:09:21 UTC, Jonathan M Davis
wrote:
> On Tuesday, 6 October 2015 at 06:52:13 UTC, Ulrich Kuettler
> wrote:
>> On Tuesday, 6 October 2015 at 02:31:53 UTC, Eric Niebler wrote:
>>> Given that starting point, ranges of different strength are
>>> an "obvious" next step that many people thought up
>>> independently. D took it one way and C++ went another.
>>>
>>> When designing my range library, I looked at all the prior
>>> art available to me including D ranges and decided D's path
>>> was not the right one for C++.
>>
>> What is your thinking here? Did you write it down somewhere?
>> This would be very interesting.
>
> Obviously, Eric would have to respond for us to know what his
> reasoning was, but I expect that it least part of it stems from
> the fact that C++ already uses iterators heavily. So, having a
> range-based solution that doesn't interact with iterators (like
> D has) doesn't fit in well with the existing code and
> paradigms. Even if you were to assume that D's approach is
> superior (which is debatable), that doesn't mean that it's a
> good fit for C++. D has the advantage of having considerably
> less baggage to deal with, so we have more freedom in the
> direction that we go. Whether we go in the right direction or
> not is another matter, but C++ has considerably more
> constraints than we have, so it's no surprise if we end up with
> different solutions.
>
Yes, this is an explanation. Thanks. So the argument being C++
customs. Now that you mention it, this seems to be the argument
in Eric's D4128 paper, too.
I was hoping for a somewhat deeper reasoning. Out of curiously, I
am still trying to grasp all the implications. Ranges are hard.
More information about the Digitalmars-d
mailing list