3 ms·
So this is one of those things where language features and language culture play a role (like unit testing in Ruby). In Ada, you attempt to capture the assumpt
by kenjackson 16y ago
So this is one of those things where language features and language culture play a role (like unit testing in Ruby).
In Ada, you attempt to capture the assumptions in either the type of the name of the type. In general, you don't ever use primitive types directly. If you're going to use integer types questions you, for example ask, what are the assumptions? Is the range of integer values from 1-100? If so, then you make an integer type of that range. When you say "50", it's "50 what"? "50 decibals", "50 meters", "50 days"? So then you have types with these names.
If they followed standard Ada dev practice this bug would have probably been obvious. Probably less obvious in standard practice for many, if not most, other languages.