Search code examples
programming-languagescategorization

Categorizing Programming Languages


I've worked among others with Java, Prolog, SQL and C# languages so far. I know that Java and C# are imperative, Prolog declarative and SQL somewhat declarative languages. Java and C# are object-oriented and you can develop aspect-oriented programs with them.

That's already four different characteristics that certain languages might fit in or implement: imperative, declarative, object-oriented, aspect-oriented and I've come across various other categories: functional languages, assembly languages and probably lots more I haven't heard.

Is there some kind of agreed and/or logical categorization or multi-dimensional categorization among which programming languages can be classified in a somewhat consistent way?


Solution

  • You can find a whole host of programming paradigms in this Wikipedia article of the same name. Especially the tree on the right is pretty helpful and comprehensive.

    And I fear, many programming languages might fit in more than one category, for example, C# is structured, imperative, object-oriented, event-driven, functional.

    • Structured because it includes flow-control statements.
    • Imperative, since you write what the computer should do.
    • Object-oriented because you can model problems with classes.
    • Event-driven because of the inclusion of multi-cast delegates and events directly in the language syntax, making some design patterns obsolete.
    • Functional because delegates are functions as first-class objects and allow you to write programs in a functional way.

    Java, on the other hand, only shares structured, imperative and object-oriented of that list, making it more of a "pure" OO language, unsullied by too many other paradigms.

    Note: Those categorizations were taken from the respective Wikipedia pages.

    Each of these classifications are orthogonal to each other and many of the ones mentioned in above article are. They describe how different aspects of the language, syntax or execution are handled.