5 Comments

The author has mixed up the programming paradigms. I would like to provide a brief explanation:

We have two general programming paradigms:

1. Imperative programming:

Imperative programming is a programming paradigm that focuses on describing computations as a sequence of statements that change the program's state. It emphasizes explicitly specifying the steps and control flow to achieve a desired outcome.

There are subtypes of this paradigm that include the following:

- Structured Programming

- Procedural Programming (Enabled by Structured programming)

- Object-Oriented Programming (An extension of Procedural programming)

- Functional Programming (Limited imperative aspects)

2. Declarative programming:

Declarative programming is a programming paradigm that emphasizes describing what the program should accomplish without specifying the exact steps to achieve it. It focuses on expressing relationships, constraints, and rules. Declarative programming languages provide a higher level of abstraction and allow the programmer to define the problem rather than the solution.

Some types of programming follow this paradigm. For example:

- Functional Programming (Haskell, Lisp, etc.)

- Database Query Languages (SQL)

- Markup Languages (XML, HTML, etc.)

- Logic Programming

- Other Domain-Specific Declarative Programming (CSS, Regular Expressions, etc.)

Expand full comment

Isn't LSP saying the opposite?

If the subclass could be substituted by the base class, why would you need the subclass in the first place?

"if S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering any of the desirable properties of that program" - Wikipedia

Expand full comment

You are right. I think the author made a mistake. You shouldn't be able to substitute a subtype with its supertype because the subtype is always more specific, while the supertype is more general. If we were able to substitute a subtype with its supertype, we would have errors in our code because the code would attempt to perform operations on the supertype that are only supported by the subtype.

Expand full comment

What tool was used to draw the pictures in the article

Expand full comment

Where i can find An extra deep dive on Wednesdays. sessions i just got the premium subscription.

thanks you

Expand full comment