On Saturday, 19 October 2013 at 08:38:52 UTC, Maxim Fomin wrote:
On Saturday, 19 October 2013 at 08:21:18 UTC, Max Samukha wrote:
On Saturday, 19 October 2013 at 07:39:36 UTC, Maxim Fomin
wrote:
This is wrong. Compare safe D and C# in safe, checked mode (I
suspect you tried to sell unchecked mode, unmanaged pointers
and C++ code invocation as unsafe C# - there are also unsafe
features like casts or unions in unsafe D, but this is
irrelevant, we are comparing safe mode) and try to come up
with examples of memory corruption in C#. At least I showed 4
cases of memory corruption, 4 cases of broken immutable, 2
cases of broken purity in safe D without casts, unions and
unchekeced attributes of extern C (which is also hole in type
system). So far, you provided only resentment that D was
negatively compred with C#.
I would agree if:
1. most of the cases you provided were not compiler bugs.
Wrong. Most of cases presented are frontend bugs, since all
three
known compilers share the same frontend, they are also buggy. In
any case, D is not in a position like C, where there are plenty
of compilers. Most are stack to dmd/gdc/ldc. So, there is no way
to escape from this "just compiler bugs". You can throw "it is
compiler bug, but not language issue" into the trash (please
also
D butthurt).
Note that you are making similar assumptions about the state of
my butt as I did about your dissatisfaction.
2. C#'s safety didn't have a price.
I didn't heard that C# would advertise itself as having speed
'more than C' or any nonsense like D promises about its safety.
I haven't heard D ever advertised itself as "faster than C". I
heard that immutability/purity provides an opportunity for
optimizations not possible in C, and those opportunities have not
been realized yet.
3. C# had immutable, pure, etc.
But features which it does care to provide, are not bunch of
holes in type system. This is so opposite to D with strings,
shared, AAs, etc.
What's wrong with D's strings?