On Monday, 16 March 2015 at 13:11:56 UTC, weaselcat wrote:
An example of a simple but fundamental issue are the defaults
of the built-in attributes. I think some of them, for
historical or compatibility reasons, are currently simply the
wrong way around (pure, @safe, final and scope should really
all be enabled by default, with scope providing recursive
guarantees) and using them properly completely destroys the
initial idea of having a clean language syntax. It's sometimes
really sad to see modern idiomatic D code degrading into a
mess of attributes and contract syntax noise. After all, a
clean syntax used to be one of the key selling points.
+1 for this entire paragraph, sometimes D looks simple and
elegant, other times it looks like someone puked attributes.
Rust code is safe by default and it is littered with unsafe{ }
blocks.
It is also immutable by default and it is littered with the 'mut'
keyword.
I think D absolutely choose the good defaults everytime but some
attribute don't buy enough compared to the line-noise they
generate.
For these reasons I mostly ignore pure, nothrow, @safe, immutable
etc... in routine code and only put them when the code is
especially reusable and somehow won't change much.
Since D1 I really value the ability to make bad code quickly in
time-contrained situations.