auria.mg at gmail.com
Fri May 28 18:41:59 PDT 2010
If there's one thing I need to agree with there, it's definitely having more than one return value.
C/C++ have it really awful by passing pointers, and then you need to document it's an "out parameter" (I know this has become very common to most of us, me included, but when I first saw this - years and years ago - I was like "WTF, parameters are defined as values going in" - I think that looking at the first reaction of beginners can sometimes point you very directly at what doesn't make sense but that experienced programmers don't notice because they're used to it).
D makes this a bit cleaner by having a "out" keyword; but still I feel that placing the first out value at the start of the function, then the second among the parameters with some special keyword is still grouping unrelated things, and splitting related ones.
So, in short, +1 ;) But I know this won't happen for D2. Guess I had to say it anyway :)
More information about the Digitalmars-d