Array as an argument, ambiguous behaviour.

Cooler kulkin at hotbox.ru
Wed Jan 29 07:41:02 PST 2014


>
> This behavior is just a consequence of the deliberate decision 
> on how arrays should be implemented.
>
> Any decision would be a trade-off. Like, if you just disallow 
> this signature, you will have to use .dup at the caller side if 
> you want the semantics of fun3. And often this copy might be 
> unnecessary.
>
> It's really like a ball under the carpet. You make it flat in 
> one place, but the ball pops up in the other.
>
> The trade-off that D chooses is pretty reasonable. You just 
> have to accept that and get used to it.

Ok! I agree with you! Can you just answer me 
http://forum.dlang.org/post/dxqxlhyhmdfuashhmtrz@forum.dlang.org


More information about the Digitalmars-d-learn mailing list