On Tuesday, 23 December 2014 at 08:43:06 UTC, ketmar via
Digitalmars-d wrote:
that's why we have `in` keyword, which clearly indicates that
argument
is "in only". making `in` default is breaking of my lovely
principle of
least astonishment.
"in" is "const scope"... But signatures in D are too noisy. It is
very difficult to avoid, so it is important to keep signatures
simple for increased legibility.
I think "in", "out", "inout" and "scope "should go. Make all
parameters that are by-value immutable by default. Make all
parameters that are ref scope restricted and alias free by
default. Add tuples. Add ways to express that parameters are used
in dangerous ways ("escapable", "returnable"...)