On 4 May 2012 18:55, Jakob Ovrum <jakobovrum@gmail.com> wrote:
On Friday, 4 May 2012 at 15:49:03 UTC, Manu wrote:
It's very counter intuitive to mark the _function_ ref, rather than it's
return type.

It is a function attribute, so it makes perfect sense. The rest is an issue of documentation/education.

I agree it may not be optimally intuitive, but I don't see any superior syntactic options.

Well, I personally see no reason not to allow 'ref' variables anywhere, just like in C++. Breaking out pointers in D feels a bit dirty, by the same reasoning that you use C++ references.
Why not make it a type modifier? It would just be a guaranteed initialised pointer like in C++, and with no pointer assignment semantics.