On Thursday, 13 December 2018 at 10:14:45 UTC, Atila Neves wrote:
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.
D and Rust are competing to get the C/C++/Java/Python market
share. In order to do that they should make it simple for
developers to convert to the new language. Due to its design,
Rust is insanely hard to master, which on the long run I think
will kill the language despite of the advantages it offers. On
the other side, consider die hard C fans: they are willing to
accept the possibility of a buffer overflow simply because they
want more power. Do you honestly think that they will ever take D
into account if @safe and immutable data will be the default?
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.
It still is, because the user is imposed to work in certain
conditions that some might not want to.