Bartosz Milewski seems to like D more than C++ now :)

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Sep 20 10:47:15 PDT 2013


On 9/20/13 10:02 AM, Szymon Gatner wrote:
> On Friday, 20 September 2013 at 16:57:43 UTC, Jonathan M Davis wrote:
>
>>
>> If an object is const, then all of its members are const, which means
>> that any
>> ranges you get from its members will be const, making such ranges
>> useless.
>>
>
> That is so weird to hear considering I added ranges to my C++ code and
> my Vector<T>::all() const can easily return non-const range even tho
> container is itself const. This kinda looks like D is more limited in
> that area than C++... Or I really am not getting something.

Yah, it should be possible for a const container to offer ranges over 
its (non-modifiable) elements.

Andrei


More information about the Digitalmars-d mailing list