Bug 8105 – Implement "in ref"

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-05-16T00:44:00Z
Last change time
2013-02-05T13:03:23Z
Assigned to
nobody
Creator
turkeyman

Comments

Comment #0 by turkeyman — 2012-05-16T00:44:06Z
'in' is a nice keyword to have, it's small, safer, and self documenting, we use it all over the place: in T*, in T[], etc But we also use: ref T a lot for passing single objects. Currently we use: const ref T, but it would be nice if we could use: in ref T to match all our other function arguments. The additional 'scope' safety of 'in' is always nice too, which we wouldn't usually bother typing because it's too long and clutters the function declaration.
Comment #1 by github-bugzilla — 2012-06-12T20:10:26Z