ldc executable crashes with this code

Patrick Schluter Patrick.Schluter at bbox.fr
Fri Feb 4 10:09:22 UTC 2022


On Thursday, 3 February 2022 at 02:01:34 UTC, forkit wrote:
> On Thursday, 3 February 2022 at 01:57:12 UTC, H. S. Teoh wrote:
>>
>
> would be nice if the compiler told me something though :-(
>
> i.e. "hey, dude, you really wanna to that?"

would be nice if programmers (C or D) learnt that a typecast 
means "shut up compiler I know what I do". You explicitly 
instructed the compiler to not complain.

Remove the typecast and the compiler will bring an error.

That's the reason why typecasts are to be avoided as much as 
possible.It is often a code smell.


More information about the Digitalmars-d-learn mailing list