Would like to see ref and out required for function calls
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Sep 13 07:21:38 PDT 2012
On 9/13/12 6:58 AM, Namespace wrote:
> In D:
>
> class A { // or struct
> A(ref int host) : _host(&host) { }
> private:
> int* _host;
> }
>
> Since when do we have initialization lists in D? ;)
Oops, sorry :o).
> at topic: +1
One question Walter and I thought about a lot was whether we should
disallow escaping addresses of ref parameters in general or only in
@safe code. We decided to go for the latter in order to avoid breakage
of existing code. Thoughts?
Andrei
More information about the Digitalmars-d
mailing list