Hacker News new | ask | show | jobs
by kqr 494 days 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.

2 comments

Do you have some examples of this? Sounds interesting. But unsure what is different to plain composition approaches?
If other languages just had the wonderful package and package body, they would have solved many or even most of my problems.