37

As it is often classified at school/college level, popular programming languages (C#, Java, C++) are all 3rd generation languages (with higher level of abstraction from the machine's physical parts). Also, assembly languages are classified as 2nd and machine languages as 1st generation languages.

Initially I was thinking SQL should be considered 4th generation language cause it is more abstract and far away from details of looping and more descriptive.

Just now I found out there are 4th generation and 5th generation languages, but what is the basis for any programming language or technology to be categorized as a 4th or 5th generation language?

Also, are there 6th or 7th generation languages as well?

Ali
  • 1,222

2 Answers2

87

“nth-generation language” is a buzzword. It is a marketing term. There is no universally accepted definition of what exactly defines the “nth generation” for n > 2. Some people categorize “scripting” languages such as Perl or Python as 4GLs because they are much more high-level than C, while others think the defining characteristics of 4GLs is that they're domain-specific, e.g. SQL. Some nitwits even think that Java (a mid-90s language full of object orientation and garbage collection and reflection) belongs in the same “3GL” category as Fortran (from the 50s) and C (from the 70s).

A categorization so confused such as “4th generation language” is of no use. You may see it in old textbooks, or hear it from people that started programming in the 80s, but a tag such as “4GL” is worthless without an accompanying explanation of what exactly the author means by that.

Since no one immediately understands what you mean by “4GL”, you should not use such categorizations. Instead, use specific terms to communicate precisely what you mean. E.g. all of NASM, LLVM IR, and Jasmin are assembly languages, but the latter two target VMs, and the last one is also an object-oriented programming language. Are all of those 2GLs? SQL is a partially declarative, domain specific language for database queries from the 80s. And TeX is a domain specific language for typesetting from the 70s. Are they both 4GLs since they are both more or less domain specific?

svick
  • 10,137
  • 1
  • 39
  • 53
amon
  • 135,795
37

Simple generations overview: a language is n'th generation when it's building blocks are

  1. bits
  2. instructions
  3. Abstract operations
  4. Domain objects
  5. Program Goals

Hence even languages as new as Google Go or Apple Swift are still solidly 3rd generation. Regex is a text matching language, which makes it an early 4th generation language. By this definition, 4th generation closely aligns with DSL's. However, note that languages such as C++ can have real-world types such as Length and Weight in addition to float and double, which makes them hybrid 3rd/4th generation.

5th generation languages do not practically exist, as they generally require a level of AI that never materialized. The fact that we programmers still are needed is exactly because non-programmers cannot tell a computer with sufficient precision what exactly they want.

MSalters
  • 9,038