Type safety could prevent nuclear war

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 4 16:56:28 PST 2016


On Friday, 5 February 2016 at 00:50:32 UTC, tsbockman wrote:
> On Friday, 5 February 2016 at 00:41:52 UTC, Ola Fosheim Grøstad 
> wrote:
>> On Friday, 5 February 2016 at 00:14:11 UTC, tsbockman wrote:
>>> But it's 2016 and my PC has 32GiB of RAM. Why should a C 
>>> compiler running on such a system skip safety checks just 
>>> because they would be too expensive to run on some *other* 
>>> computer?
>>
>> C has to be backwards compatible, but I don't know why people 
>> do larger projects in C in 2016.
>> [...]
>
> Why would simply adding a warning change any of that?
>
> No ABI changes are required. Backwards compatibility is not 
> broken.

Not sure what you mean by adding a warning. You can probably find 
sanitizers that do it, but the standard does not require warnings 
for anything (AFAIK). That is up to compiler vendors.

As for why C isn't displaced by something better, maybe the right 
question is: why don't new languages stick to the C ABI and 
provide sensible C code gen.

Well, they want more features... and features... and features...

There is probably a market for it, but nobody can be bothered to 
create and maintain a simple modern system level language.



More information about the Digitalmars-d mailing list