7 ms·
My favorite thing about Ada is how it uses modules ("packages") for encapsulation and not classes. This separates it from a lot of other languages with object-
by pyjarrett 3y ago
My favorite thing about Ada is how it uses modules ("packages") for encapsulation and not classes. This separates it from a lot of other languages with object-oriented programming by allowing you to split up and expose externally visible behavior in modules and submodules without making type internals visible, but allowing other elements in the implementation side of the module and submodules to look inside.
- akritid 3y agoThe explicitly specialised generic packages are nice too
- ReleaseCandidat 3y agoYes, they are "officially" ML (no, not that ML) style. https://ada-lang.io/docs/learn/why-ada#feature-overview https://ada-lang.io/docs/learn/why-ada#feature-overview
- pjmlp 3y agoMost languages with OOP also do modules, all the way back Simula and Smalltalk started to influence Mesa/Modula-2 derived languages. Additionally in a somewhat naive ways, classes can be seen as extensible modules, which in the presence of generics is less required as in languages that don't support them. When using something like Standard ML functors, classes aren't really needed.