Andrei Alexandrescu Wrote: > This program will generate a valid executable, but will also print > during compilation: > > Type int is not a random access range because: > no empty property > no front property > no popFront method > no indexing > no slicing > > When a programmer has an odd issue with a range check, turning > verboseness of checks could help. > > What do you think? > > > Andrei
I think it would be best if DMD would emit which constraint failed. Better support for automatically say why would be good too. Basically I like bearophile's suggestion to give them more structure. But until then, yes do this. It should be everywhere, but ranges a big, and need them now!