Multiple return values

Jacob Carlborg doob at me.com
Wed Jan 4 23:27:04 PST 2012


On 2012-01-05 00:31, F i L wrote:
> bearophile wrote:
>> deadalnix:
>>
>>> I do agree with Andrei. Those are 2 orthogonals problems. The
>>> optimization problem is clearly something that can be improved in D
>>> ABI. Then, returning a tuple could be improved using thoses rules.
>>
>> I agree.
>>
>>
>>> The multiple retur value problem is syntaxic sugar. It may be
>>> interesting, but not #1 priority.
>>
>> I don't agree. In this moment of the D development it's still more
>> important to design D well than to squeeze every bit of performance
>> out of the reference implementation.
>>
>> Example: currently vector operations have some small syntax (and maybe
>> semantic) problem, plus performance problems. I think fixing their
>> syntax is currently more important.
>>
>> Fixing performance problems is possible to do later in GDC/LDC if the
>> language design is good, but fixing the syntax later is quite harder
>> to do.
>>
>> Bye,
>> bearophile
>
> +1 to this. Performance is key to D's success of course, but what will
> attract more developers is clean and bug free aesthetics. DMD already
> outperforms MS/Mono C# in all of my modest benchmarks. GDC and LDC much
> more so.
>
> The first two things that really made me want to use D where reading
> about it's built-in Arrays and Unittests. Multiple return syntax could
> only make D feel more hip. A complaint I've heard before is how C-like D
> tries to be with it's library naming (eg, std.writeln vs
> Console.WriteLine), so I don't think tradition or heritage are good ways
> to increase support. While D's naming seems natural enough to me or
> anyone who's written C/C++ code, from an outside perspective you might
> wounder why there was module dealing with venereal disease.
>
> I know you D developers, have a lot on your plates. Thank you all.
>

C#, Java and similar language doesn't support free functions like D 
does. Then they have to resort to "hacks" like static methods, i.e. 
Console.WriteLine.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list