Why is D unpopular?
Siarhei Siamashka
siarhei.siamashka at gmail.com
Thu May 19 10:15:18 UTC 2022
On Thursday, 19 May 2022 at 00:29:46 UTC, Walter Bright wrote:
> I did a quick look at D's undefined behavior, and nearly all of
> it is disallowed in @safe code.
>
> It's not 100%, but we're in a strong position.
Regarding safety and avoiding various sources of undefined
behavior. Do you agree that "Implementation Defined: The built-in
associative arrays do not preserve the order of the keys inserted
into the array. In particular, in a foreach loop the order in
which the elements are iterated is typically unspecified." from
https://dlang.org/spec/hash-map.html can be a source of bugs in
the user code?
Also I wonder about the motivation to have
"SwapStrategy.unstable" set as the default for
https://dlang.org/phobos/std_algorithm_sorting.html#sort ? If
somebody actually wants a stable sort, but just happens to forget
to override the default in some part of their code, then this
mistake may cost many hours spent on debugging/troubleshooting.
More information about the Digitalmars-d
mailing list