DMD 1.011 release
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Wed Apr 11 14:12:33 PDT 2007
Marcin Kuszczak wrote:
> Sean Kelly wrote:
>
>> freeagle wrote:
>>> Walter Bright wrote:
>>>> Bug fixes, some enhancements.
>>>>
>>>> http://www.digitalmars.com/d/changelog.html
>>>>
>>>> http://ftp.digitalmars.com/dmd.1.011.zip
>>> what was wrong with "inout" ?
>> Got me. in, out, and inout are already present in other languages (Ada
>> and CORBA, IIRC), and the names seem internally consistent. I can't say
>> I understand the reason for a new keyword here.
>>
>>
>> Sean
>
> What's more it is common notation in UML tools - there is no 'ref' but there
> is in/out/inout.
>
> So why to change?
>
I think the notion of using 'ref' was to avoid a "misrepresentation of intent" when coding
libraries. In other words, using for example "void foo (inout SomeStruct)" when the
referance to the structure is used solely to avoid copying, and not because the function
intends to modify it at all. To some people, this is apparently incongruent. Personally,
I'm fine with it, as my autognostic interpretation of 'in', 'out', and 'inout' is as a
description of how data flows. It either flows 'in'to the function, 'out' of it, or 'in-'
and '-out' freely. *shrug* I'd be plenty cool with having /both/ 'ref' and 'inout' for
that purpose, then, except that it feels just a little wrong to have two keywords with
identical semantics.
-- Chris Nicholson-Sauls
More information about the Digitalmars-d-announce
mailing list