1. 44
  1. 12

    Some things I wanted to mention, based on my (largely positive) experience with Ada:

    Object-oriented programming (OOP) is a large and ill-defined concept in programming languages and one that tends to encompass many different meanings […]

    This is something Ada gets very, very right, in my opinion. In many languages, OOP is a kitchen sink idea where you take it all or you’ll have none of it. Ada successfully manages to separate out the various components of OOP (encapsulation, polymorphism, information hiding, etc.) Into different language features, meaning both that you can pick and choose – and that you get more insight into what OOP really is.

    Ada exceptions are not types, but instead objects, which may be peculiar to you if you’re used to the way Java or Python support exceptions.

    Sounds nonsensical, but if you read it extremely carefully, it makes more sense. In Python, different exceptions are different classes, and different instances of the same exception class count as “the same exception” .

    In Ada, there is only one exception “class”. Different exceptions are instead different instances of the same type – but there is only ever one instance of each exception “type”.

    1. 4

      (encapsulation, polymorphism, information hiding, etc.)

      I just wanted to shout out to a fellow engineer who doesn’t confuse encapsulation and data hiding into one thing :-)

      1. 3

        Could you expand on that?

          1. 3

            That’s pretty much exactly what I’d answer, thanks!

    2. 0

      In the first few paragraphs I was thinking he was talking about Agda, not Ada, and got confused as heck.