Built-in unsafety in D

Ellery Newcomer ellery-newcomer at utulsa.edu
Fri Mar 12 08:04:50 PST 2010


On 03/12/2010 07:46 AM, bearophile wrote:
>
> The bug was caused by:
> typedef unsigned Signal;
>

It would be very nice to be able to know where unsafe comparisons are 
happening in your program without having to modify and recompile dmd.

Another thing that bit me is

foreach(k; arr){
	k = something;
}

when k should have a ref attribute.

I think both of these are good candidates for warnings: neither is 
necessarily incorrect, but they often are.

Otherwise, I am very well convinced by now that fixnums are a severe 
inhibition to writing good code. I would very much like to see arbitrary 
precision integers supported on a language level.



More information about the Digitalmars-d mailing list