Newbie initial comments on D language - scope
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Sat Feb 2 11:36:42 PST 2008
Walter Bright wrote:
> The only question is whether the proxy struct will be easy enough to use
> to not need extra core language support:
>
> scope C c;
>
> v.s.:
>
> Scope!(C) c;
The latter won't be as nice as-is, since in the first case you can omit
the C, and have it inferred.
Unless you accept Scope!(auto), I don't see how you could do this.
Even then, you need both 'Scope' and 'auto', but I personally don't have
a problem with dropping type inference for declarations that don't
include 'auto' and having 'auto' be automatically replaced with the
inferred type (even in template arguments).
That wouldn't be backwards-compatible though, so you might want need to
keep allowing non-'auto' automatic inference as well. Currently 'auto'
is also allowed in non-final-attribute position, and that would be
inconsistent as well if it's kept.
More information about the Digitalmars-d
mailing list