what are const scope parameters?

Jason House jason.james.house at gmail.com
Fri Mar 7 18:09:45 PST 2008

Denton Cockburn wrote:

> and what are they good for?
> I'm trying to understand the difference between:
> "in Foo x" and "const(Foo) x" in D2.

I believe the difference is that in your first case x can't be kept past the
function lifetime and in the second case, a copy of x can be kept.

More information about the Digitalmars-d-learn mailing list