Why is this D code slower than C++?

%u u at infearof.spm
Thu Jan 18 00:50:52 PST 2007


Lionello Lunesu Wrote:
> No, it can't.. Passing a struct by ref will result in unexpected 
> behavior if it changes in some other thread. As always, the default 
> should be safe no matter what, and that means copying the struct's contents.
That's right for structs.
 
> I guess a new modifier like "byref" is the only option..
"byref" is the wrong word here because the real meaning is "value parameter that is not assigned to". Thus "const" is right and already reserved.


More information about the Digitalmars-d-learn mailing list