Ref local variables?
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jan 11 17:13:23 PST 2012
On Wednesday, January 11, 2012 01:06:21 Ben Davis wrote:
> So - could support for 'ref' local variables be added, or is there a
> reason not to?
While I don't really care about having ref local variables (it's possible in
C++, and I almost never use them there - const & is pretty much the only way
that I use references in C++), I _am_ curious as to why we ended up with ref
for function parameters and foreach variables but not local variables. My
_guess_ would be because of how a large percentage of C++ users do what I do
and only use references for const & parameters, but I don't know. I may have
to go digging through the archives to see if an explanation was given
anywhere.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list