What's missing to make D2 feature complete?
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 23 23:44:22 PST 2014
"Ola Fosheim Grøstad" " wrote in message
news:gkhgxlioxkzmxbiazfwn at forum.dlang.org...
> On Tuesday, 23 December 2014 at 01:42:49 UTC, ketmar via Digitalmars-d
> wrote:
> > i really really hate immutable integer args, for example, and can't
> > see any sense in doing it. that's why i wondered.
>
> It might be a bit annoying for short functions, but in principle the
> function signature should be written for the user (document an
> encapsulated interface) and exposing irrelevant aspects of the
> implementation in the interface is "bad taste".
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.
More information about the Digitalmars-d
mailing list