Blog post: What D got wrong
Atila Neves
atila.neves at gmail.com
Thu Dec 13 10:14:45 UTC 2018
On Thursday, 13 December 2018 at 09:40:45 UTC, RazvanN wrote:
> On Tuesday, 11 December 2018 at 10:45:39 UTC, Atila Neves wrote:
>> A few things that have annoyed me about writing D lately:
>>
>> https://atilanevesoncode.wordpress.com/2018/12/11/what-d-got-wrong/
>
> That was a really good blog post, however I am strongly against
> the following sentence:
>
> "I think there’s a general consensus that @safe, pure and
> immutable should be default."
>
> It's not at all a general consensus and doing this would
> literally break all the existing D code. Without discussing all
> the technical aspects, this will severely impact the adoption
> rate of D because it will make it very complicated for people
> coming from a C/C++/Java background to accommodate with the
> language. In addition, this is completely against D's liberal
> philosophy where you can program however you want.
My impression is that it's a consensus that it _should_, but it's
not going to happen due to breaking existing code.
> this will severely impact the adoption rate of D because it
> will make it very complicated for people coming from a
> C/C++/Java background to accommodate with the language
How? Rust has immutable and safe by default and it's doing fine.
> this is completely against D's liberal philosophy where you can
> program however you want.
It would be if the change weren't accompanied by adding `impure`
and some sort of mutable auto. @system already exists. It's a
question of opting out (like with variable initialisation)
instead of opting in.
More information about the Digitalmars-d-announce
mailing list