"Ola Fosheim Grøstad" " wrote in message news:[email protected]...

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.

Reply via email to