const a storage class or a type modifier?
Jonathan M Davis
jmdavisProg at gmx.com
Fri Nov 26 13:55:22 PST 2010
On Friday 26 November 2010 10:24:02 Trass3r wrote:
> > I don't really have a preference. Note that for function arguments, you
> >
> > can also use 'in' to mean const:
> > void foo(in int*, char *, in float*);
>
> Isn't "in" the default (even if nothing is specified)?
No. in is the same as const scope. If in were the default, all function
parameters would have to be const or immutable (since you couldn't ever unmark
them as const - though marking them as immutable would override const).
- Jonathan M Davis
More information about the Digitalmars-d
mailing list