`ref T` should be a type!!

Rubn where at is.this
Fri Mar 29 19:55:12 UTC 2019


On Friday, 29 March 2019 at 16:06:09 UTC, Victor Porton wrote:
> That `ref T` (where T is a type) is not a type is a serious 
> design error, because so `ref T` cannot be used as a template 
> argument.
>
> It is a very serious problem.
>
> Even in C++ despite of all its silliness, T& is a type and can 
> be used as a template argument.
>
> Can the language be changed to resolve this problem?


You can't have reference variables in D, and I doubt walter will 
allow them. It doesn't make much sense to have a type that allows 
ref if you can't declare a variable with it.





More information about the Digitalmars-d mailing list