3 ms·
Indeed. As a concrete example of one of those things Ada gets very right, it breaks down object-oriented programming into separate features of - encapsulation,
by kqr 2y ago
Indeed. As a concrete example of one of those things Ada gets very right, it breaks down object-oriented programming into separate features of
- encapsulation,
- reuse,
- inheritance, and
- dynamic dispatch.
In Ada, you can opt into each of those things separately, depending on what you need “object-oriented programming” for. This is in big contrast to Java, where you type the keyword “class” and then all of that comes along for the ride.
I never truly understood OOP until I worked a bit with Ada.
- MortyWaves 2y agoDo you have some examples of this? Sounds interesting. But unsure what is different to plain composition approaches?
- thesuperbigfrog 2y agoSee https://learn.adacore.com/courses/intro-to-ada/chapters/object_oriented_programming.html https://learn.adacore.com/courses/intro-to-ada/chapters/obje...
- m463 2y agoIf other languages just had the wonderful package and package body, they would have solved many or even most of my problems.