Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Should I stick to a one package, one type approach while writing Ada software?

0
10 Posted

Should I stick to a one package, one type approach while writing Ada software?

0

(Robb Nebbe responds) Offhand I can think of a couple of advantages arising from Ada’s separation of the concepts of type and module. Separation of visibility and inheritance allows a programmer to isolate a derived type from the implementation details of its parent. To put it another way information hiding becomes a design decision instead of a decision that the programming language has already made for you. Another advantage that came “for free” is the distinction between subtyping and implementation inheritance. Since modules and types are independent concepts the interaction of the facilities for information hiding already present in Ada83 with inheritance provide an elegant solution to separating subtyping from implementation inheritance. (In my opinion more elegant than providing multiple forms of inheritance or two distinct language constructs.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.