Does D have too many features?

deadalnix deadalnix at gmail.com
Sun Apr 29 14:18:12 PDT 2012


Le 29/04/2012 21:30, Nick Sabalausky a écrit :
> "deadalnix"<deadalnix at gmail.com>  wrote in message
> news:jnhopd$gi3$1 at digitalmars.com...
>>
>>   - out arguments. We can return tuples, out argument is going backward in
>> history.
>
> You can overload on out parameters. You can't overload on return type. So
> without "out" making an optional output param would be harder to make and
> uglier to use. That could be even more of a problem if the out param in
> question is expensive to compute.
>

Good point, but it have many way to work around and shouldn't justify a 
feature in the core language by itself, especially if, like out 
parameter, it is a confusing feature.

> Also, out is nice when interfacing with C. Returning tuples wouldn't help
> here.
>

C don't have out parameters as D have. C have pointer to do kind of out 
parameters, and D have pointers too, this is a non issue.


More information about the Digitalmars-d mailing list