Worst ideas/features in programming languages?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu Nov 11 08:07:07 UTC 2021


On Thursday, 11 November 2021 at 00:26:06 UTC, Timon Gehr wrote:
> On 11/5/21 6:02 PM, Atila Neves wrote:
>> On Tuesday, 12 October 2021 at 21:38:48 UTC, Timon Gehr wrote:
>>> - .init
>> 
>> Because?
>> ...
>
> It's Hoare's billion dollar mistake, extended to all types. 
> Having a default instance is often antithetical to strong 
> invariants. At least it can be hidden I guess.

I don't see how ```.init``` is related to null as long as you can 
disable default construction?

That said, I find ```.init``` annoying and want to see it 
adjusted (zero default across the board for fast array 
initialization + user provided default constructor).





More information about the Digitalmars-d mailing list