3 ms·
But if they had set up this specific metric integer (float?) type for measuring force in, that implies to me that they had already anticipated that the mix-up o
by archangel_one 16y ago
But if they had set up this specific metric integer (float?) type for measuring force in, that implies to me that they had already anticipated that the mix-up of units was likely to be a problem. From what I've heard about it, that wasn't the case - neither side thought about it until after they knew it had failed.
It seems like it'd be great if the type system had caught that, but if they expected all software to be using SI units they may not have seen the necessity for it even if they were working in a language which permitted that kind of thing.
- kenjackson 16y agoSo 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.