Re: On Variable References

2015-01-22 Thread Meta via Digitalmars-d-learn
On Thursday, 22 January 2015 at 14:52:26 UTC, Marc Schütz wrote: On Wednesday, 21 January 2015 at 17:14:29 UTC, Meta wrote: On Wednesday, 21 January 2015 at 08:23:44 UTC, Per Nordlöw wrote: On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw wrote: int x; auto ref xr; Correction: I,

Re: On Variable References

2015-01-22 Thread via Digitalmars-d-learn
On Wednesday, 21 January 2015 at 17:14:29 UTC, Meta wrote: On Wednesday, 21 January 2015 at 08:23:44 UTC, Per Nordlöw wrote: On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw wrote: int x; auto ref xr; Correction: I, of course mean, int x = 42; auto ref xr = x; Walter is

Re: On Variable References

2015-01-21 Thread weaselcat via Digitalmars-d-learn
On Wednesday, 21 January 2015 at 17:14:29 UTC, Meta wrote: On Wednesday, 21 January 2015 at 08:23:44 UTC, Per Nordlöw wrote: On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw wrote: int x; auto ref xr; Correction: I, of course mean, int x = 42; auto ref xr = x; Walter is

Re: On Variable References

2015-01-21 Thread Nordlöw
On Wednesday, 21 January 2015 at 17:14:29 UTC, Meta wrote: Walter is strongly against adding references a la C++ to D, as he believes they are too complicated and bug prone. He's made several posts on this, but I can't find them now. It would be interesting to read about how Walter thinks here

Re: On Variable References

2015-01-21 Thread Meta via Digitalmars-d-learn
On Wednesday, 21 January 2015 at 08:23:44 UTC, Per Nordlöw wrote: On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw wrote: int x; auto ref xr; Correction: I, of course mean, int x = 42; auto ref xr = x; Walter is strongly against adding references a la C++ to D, as he

On Variable References

2015-01-21 Thread via Digitalmars-d-learn
Why doesn't D allow declarations such as int x; auto ref xr; ? What is so fundamentally bad about this compared to foreach variables and function arguments passed by reference? Will Walters latest commits regarding http://wiki.dlang.org/DIP25 change this matter?

Re: On Variable References

2015-01-21 Thread via Digitalmars-d-learn
On Wednesday, 21 January 2015 at 08:22:44 UTC, Per Nordlöw wrote: int x; auto ref xr; Correction: I, of course mean, int x = 42; auto ref xr = x;