const
Jason House
jason.james.house at gmail.com
Fri Mar 28 17:00:07 PDT 2008
Walter Bright wrote:
> Denton Cockburn wrote:
>> I've been trying to figure out the difference for a while now.
>> I started 2 threads on D newsgroups...neither of which provided a
>> reasonable response. I still would like to see a good explanation of why
>> we have 2 keywords that do the exact same thing (esp. when one has no
>> other purpose - in).
>
> It's a good question. The only value 'in' has is it's shorter.
I thought in was "const scope". I interpret that to mean that in is
stronger than const. It means that the data is not guaranteed to be
excessible beyond the function call. I guess with a garbage collected
system that makes less sense. Certainly invariant scope makes more sense
to me (guarantee invariance only over the duration of the function call)
More information about the Digitalmars-d
mailing list