Automatic typing
JS
js.mdnq at gmail.com
Fri Jun 28 15:00:54 PDT 2013
On Friday, 28 June 2013 at 14:02:07 UTC, Steven Schveighoffer
wrote:
> On Fri, 28 Jun 2013 02:51:39 -0400, JS <js.mdnq at gmail.com> My
> argument is that auto should be left the way it is. I don't
> want it to change. And variant already does what you want with
> less confusing semantics, no reason to add another feature.
>
> -Steve
Using the auto keyword was just an example. My argument does not
depend the specific keyword used. My "idea" is simply
generalizing auto to use forward inferencing.
variant is NOT what I am talking about. It is not a performant
time but a union of types. I am talking about the compiler
finding the best choice for the type by looking ahead of the
definition of the time.
I think variant would be a good choice as my suggestion is a sort
of optimization of variant. i.e., attempt to find the
appropriate type at compile time, if not use a variant(or throw
an error).
More information about the Digitalmars-d
mailing list