RFC: naming for FrontTransversal and Transversal ranges

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Apr 29 19:28:19 PDT 2009


Jason House wrote:
> I'm a C++ refugee and value semantics make no sense to me. I always
> declared classes (as part of function declaration) in C++ with a &...
> Either T& or const T&. There were plenty of bugs where I messed up
> and forgot the &. D is nice in that it tries to simplify that. You
> yourself had issues with remembering ref parameters when implementing
> ranges!

Good point, but the issue boils down to this: do we define container 
members more often, or define container function parameters more often? 
Because inside a data structure value semantics are useful more often 
than not, and in a function parameter list reference semantics are 
useful more often than not.

I do agree that D programmers grown used to cheap-to-pass data and I 
don't want to cure anyone of hiccups :o).


Andrei



More information about the Digitalmars-d mailing list