4 ms·
Doesn’t Ada have bounds checking? This would be super useful, and prevent a large problem with buffer overflows. It would be nice to have some flag to turn it
by blackrock 6y ago
Doesn’t Ada have bounds checking?
This would be super useful, and prevent a large problem with buffer overflows. It would be nice to have some flag to turn it off, to increase the speed mode.
- thesuperbigfrog 6y ago>> Doesn’t Ada have bounds checking? Yes. Ada numeric types can be defined to only allow a specific range of values: Integer types: http://www.ada-auth.org/standards/12rm/html/RM-3-5-4.html http://www.ada-auth.org/standards/12rm/html/RM-3-5-4.html Floating-Point types: http://www.ada-auth.org/standards/12rm/html/RM-3-5-7.html http://www.ada-auth.org/standards/12rm/html/RM-3-5-7.html >> It would be nice to have some flag to turn it off, to increase the speed mode. Many Ada implementations have compile flags to turn off runtime bounds checking.
- Gibbon1 6y agoHaving real arrays would make both the compiler faster and array operations faster. range and mod types as in Ada would also squelch a bunch of C's shitastic undefined behavior bullshit. And your comment about just implementing it via a feature flag would be the way to go.