Why structs and classes instanciations are made differently ?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 24 08:55:51 PDT 2017


On Mon, Jul 24, 2017 at 03:45:29PM +0000, Houdini via Digitalmars-d-learn wrote:
> But in C++, we pass them by reference also to avoid copies (const &).

Exactly... in C++ you basically always pass by reference, so D made that the default.



More information about the Digitalmars-d-learn mailing list