ow Integers Should Work

bearophile bearophileHUGS at lycos.com
Mon Dec 5 10:30:54 PST 2011


Manu:

> but I don't believe I'm alone.. the rest
> of the gamedev community will find D soon enough if the language gets it
> right...

I think games are one of the most important short-term purposes of D, despite I think D was not explicitly designed to write games.


> If you're suggesting the reason for trapping overflow's is
> specifically to CATCH bugs like this, then maybe make is a compiler
> flag when building a debug binary? (ie. assert on integer overflow).

Right.


I think D2/D3 has also a bit of hope to replace some of the purposes of Ada language. Walter maybe didn't think of it when he designed D, but D shares some design purposes with Ada. Walter past work in aeronautical engineering leads naturally to a language that shares some of the purposes of Ada. For such purposes correctness and reliability are of the highest importance, this also means full type safety (implicit type conversions = bad) and number safety (integral overflows = bad). Defining something like a "MISRA-D" (a strict and safe subset of D similar to MISRA-C) is an option, and maybe it will produce a less butchered language.

Bye,
bearophile


More information about the Digitalmars-d mailing list