What's missing to make D2 feature complete?

via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 23 23:53:37 PST 2014


On Wednesday, 24 December 2014 at 07:44:21 UTC, Daniel Murphy 
wrote:
> Making value parameters immutable, and therefore making the 
> fact that they're not modified inside the function visible 
> externally, _IS_ "exposing irrelevant aspects of the 
> implementation in the interface".  The caller doesn't care what 
> you do with them.

No. Make value parameters immutable, period. No mutable version 
as an option. This does not expose anything to the caller.

If you want a mutable version in the implementation, do so in the 
function body. If you only refer the mutable version in the 
function body then the overhead will be optimized away by the 
backend.


More information about the Digitalmars-d mailing list