Bug 1275 – ambiguity with 'in' meaning

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-06-18T02:51:00Z
Last change time
2014-02-14T20:35:53Z
Assigned to
bugzilla
Creator
braddr

Comments

Comment #0 by braddr — 2007-06-18T02:51:19Z
A snipping from the function.html docs: =========== Function Parameters Parameter storage classes are in, out, ref, lazy, final, const, invariant, or scope. For example: int foo(in int x, out int y, ref int z, int q); x is in, y is out, z is ref, and q is none. out is rare enough, and ref even rarer, to attach the keywords to them and leave in as the default. The reasons to have them are: * The function declaration makes it clear what the inputs and outputs to the function are. * It eliminates the need for IDL as a separate language. * It provides more information to the compiler, enabling more error checking and possibly better code generation. * It (perhaps?) eliminates the need for reference (&) declarations. The in storage class is equivalent to final const scope. ============= There was a debate about whether or not the implicit 'in' behavior when 'in' ins't actually listed should imply 'final const scope' and I believe the answer was 'no'. The above leaves that very unclear.
Comment #1 by bugzilla — 2007-06-27T20:57:19Z
Fixed dmd 2.001