Default initialization no longer a thing
Hipreme
msnmancini at hotmail.com
Tue Oct 24 15:39:09 UTC 2023
On Tuesday, 24 October 2023 at 15:30:33 UTC, Guillaume Piolat
wrote:
> On Monday, 23 October 2023 at 18:54:45 UTC, IGotD- wrote:
>> What is your take on this and if D would ever be modernized,
>> is this something that D should consider?
>
> Sorry don't have any issue with T.init.
> It's not like because it's in D and have not changed for 5
> years that it must be bad.
Nope, default initialization is the best thing that could have
been created. After people created typescript because not having
types was a mistake, the second think we got was default
initialization.
The only problem I ever had with D was float being initialized to
nan instead of 0. This has been talked a lot of times now. If you
read the post from Sonke, you can see that D is not being how
simple it was from before from the addition of lot of keywords:
`pure`, `nothrow`, `@nogc`, `scope`, `return`. I don't want any
more verbosity than that, so all hail default initialization :D
More information about the Digitalmars-d
mailing list