3 ms·
I think this is a good example of how Ada handles data. The approach is to describe the data structures and let the compiler handle the best implementation. I
by MarcusE1W 3y ago
I think this is a good example of how Ada handles data. The approach is to describe the data structures and let the compiler handle the best implementation.
I don’t know if that always leads to the most efficient code, but what it does is that you often think about your data first before you start programming. It’s a different type of prototyping. Once that is done a lot of the programme flows naturally around that.
Nothing stops you to do that in other languages of course but Ada makes it quite easy and part of the concept.
Together with pre- and post-contracts you get a long way in writing code that avoids some of the usual error groups without much effort.
Plus it is (in my view) easier for someone to read code if you can quickly check the range of an integer or to read the pre-post-contracts of functions. It is surprising for me how much of an implementation is fixed, once that sort of thing is clear.