DIP(?) Warning to facilitate porting to other archs

Nick Sabalausky via Digitalmars-d digitalmars-d at puremagic.com
Fri May 2 12:54:37 PDT 2014


On 5/2/2014 12:21 PM, Jonathan M Davis via Digitalmars-d wrote:
>
> As far as the compiler is concerned, everything
> should be either an error or nothing (and Walter agrees with me on this;

It would be nice if all code *could* be considered either "good" or 
"error" without causing problems. But we don't live in a perfect 
back-and-white reality, and forcing everything into dichotomy doesn't 
always work out so well.

> Warnings belong in lint-like tools where the user can control what they want
> to be warned about,

Warnings ARE a built-in lint-like tool. On top of that, lint itself 
proves that lint tends to not get used. If it's too hard for people to 
occasionally toss in a -m32 to check if that works, then no lint-like 
tool is going to solve the issue either.

That said, I do think people are underestimating the difficulty of this 
enhancement, and overestimating the benefit. It's difficult because 
size_t is (by design) only an alias and there are issues with making it 
a separate type. And it's not really worth the difficulty of getting 
around all that because it's it's already trivially checked whenever you 
want by tossing in an -m32.

I think this enhancement is a great *idea*, but not realistic.



More information about the Digitalmars-d mailing list