Default initialization no longer a thing
IGotD-
nise at nise.com
Mon Oct 23 18:54:45 UTC 2023
I've recently seen that modern program languages are going away
from default initialization. D early recognized no initialization
being one of the many flaws in C/C++ and added default
initialization which greatly improved stability which has been
the standard for many languages since. C++ "fixed" this very
recently but really not.
Now even more modern languages are going away from default
initialization as some claim that default initialization was a
source of bugs. The implementation might differ, some must give a
variable a value at declaration others detect use before assign.
What is your take on this and if D would ever be modernized, is
this something that D should consider?
More information about the Digitalmars-d
mailing list