www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - references as return value?

reply coxalan <coxalan web.de> writes:
Hello!

I looked for the possibility to return references like in C++, but I did not
find anything.

Is it possible to return references in D?
If yes, how?
If no, why not?

Thanks!
Oct 17 2007
parent BLS <nanali nospam-wanadoo.fr> writes:
coxalan schrieb:
 Hello!
 
 I looked for the possibility to return references like in C++, but I did not
find anything.
 
 Is it possible to return references in D?

NO
 If yes, how?
 If no, why not?

Very good question
 
 Thanks!

Actually you have to use pointers instead. Bjoern
Oct 17 2007