On Tue, 08 Nov 2011 18:57:19 -0500, Martin Nowak <[email protected]> wrote:
On Wed, 09 Nov 2011 00:01:09 +0100, Walter Bright
<[email protected]> wrote:
On 11/8/2011 11:10 AM, Martin Nowak wrote:
I personally find it much more astonishing that inout methods finally
work.
I literally meant methods as in member functions.
Being able to use inout as method qualifier is way more
important than achieving the same for free functions as it
makes transitive qualifiers almost hassle free in simple cases.
To give a bit of trivia, the main motivator for proposing what is now
inout was trying to port Tango to D2. In doing this, I realized that in
order to be const-correct, I was going to have to triplicate all property
accessors on classes (and Tango uses classes + properties much more than
Phobos does). The prospect of having three *identical* copies of the same
function just so I could have something as simple as an accessor was
reason enough to find a better solution before moving forward on Tango for
D2.
In other words, the astonishment was intentional :)
BTW, I want to publicly thank Kenji Hara for his work on making inout a
reality. He created the patch that solved all the remaining inout
problems, then quickly fixed most of the remaining bugs found with his
patch before this last release. Without his work, inout would still be a
pipe-dream!
-Steve