DMD 1.011 release

Derek Parnell derek at psych.ward
Wed Apr 11 15:16:17 PDT 2007


freeagle wrote:
>> what was wrong with "inout" ?
 
Walter Bright wrote:
> Because there are uses for reference variables other than function 
> parameters. Those look definitely odd being marked as 'inout'.

I count ten different parameter passing scenarios but I can't see the D
syntax for three of those. Have I got this right ...?

Parameter passing cases:

  Mechanism Parameter    Referenced   Pre-Init  D Syntax
  ---------+------------+------------+--------+--------------------
  by value  unmodifiable unmodifiable  n/a      final in
  by value  unmodifiable modifiable    n/a      const in
  by value  modifiable   unmodifiable  n/a      ???
  by value  modifiable   modifiable    n/a      in
  
  by ref    unmodifiable unmodifiable  n/a      final ref
  by ref    unmodifiable modifiable    n/a      const ref
  by ref    modifiable   unmodifiable  no       ???
  by ref    modifiable   modifiable    no       ref

  by ref    modifiable   unmodifiable  yes      ???
  by ref    modifiable   modifiable    yes      out

-- 
Derek Parnell
Melbourne, Australia
"Justice for David Hicks!"
skype: derek.j.parnell



More information about the Digitalmars-d-announce mailing list