What does 'scope' mean for non-class types?
Lars T. Kyllingstad
public at kyllingen.NOSPAMnet
Sun May 30 02:51:07 PDT 2010
On Sun, 30 May 2010 08:15:50 +0200, Don wrote:
> div0 wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Lars T. Kyllingstad wrote:
[...]
>>> // According to the spec, 'in' is shorthand for 'const scope'. void
>>> foo(in char[] d) { ... }
>>
>> d is const (read only).
>> I've no idea why scope is mentioned, it's meaningless in the context of
>> function arguments.
>
> I think in one of the early, complicated versions of the const system,
> it meant something. Looks like this mention of it was accidentally left
> in the spec.
So in the context of function arguments, 'in' is just a synonym for
'const'? It seems to me like it should be removed from the language,
then.
-Lars
More information about the Digitalmars-d-learn
mailing list