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?

13
  • 21
  • 12
    Oh, if only people could agree on what makes an nth Gen language that n... There is no criteria one can truly tie down (except from stating that higher gen languages are further removed from bare metal than lower level - by what degree is not agreed upon).
    – Oded
    Jan 5, 2015 at 12:50
  • 5
    Which "generation" is C? Can you give some examples of 4th& 5th generation languages & tell us what makes each generation? I.e. what criteria define a language as generation 'n'? Jan 5, 2015 at 13:30
  • 3
    Tbh I don't think the concept of Xth generation language is really relevant.
    – Pieter B
    Jan 5, 2015 at 14:27
  • 5
    I'm making a 14th generation language, and it's going to be pure wizardry, because it's the seventh son of a seventh son.... Jan 5, 2015 at 21:10

2 Answers 2

36

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.

14
  • 1
    N.B. about the last paragraph: J.Pitrat's blog have interesting stuff related to AI & programmers Jan 5, 2015 at 14:42
  • 5
    The DONALD problem on that blog problem highlights how far we're still away from sudo make me a sandwich, and worryingly how much progress we've made over the last 50 years.
    – MSalters
    Jan 5, 2015 at 14:50
  • 1
    @AndrewHoffmann What's wrong with that? If you're building a bridge, you better have the right kind of material for your structure, and rivets better be the right size (and how many sizes there are?).
    – didierc
    Jan 5, 2015 at 17:13
  • 1
    @AndrewHoffman: AI has been mostly a CS topic in academia, not a software engineering topic. It may be argued that real engineering would have been a benefit. There's probably a good reason the first self-driving car seems to be Google's.
    – MSalters
    Jan 5, 2015 at 20:33
  • 6
    @AndrewHoffman - speak for yourself. I am a software engineer and I use pretty standard engineering practices every day. Also, I'm a certified engineer. I think that your entire comment is nonsense based on your personal experience rather than based in fact. Jan 6, 2015 at 5:53
88

“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?

14
  • 22
    I'm developing an 8G language. It's going to be mind-blowing. ...it'll even julienne fries. I'll sell licenses for three easy payments of... ;)
    – BrianH
    Jan 5, 2015 at 15:13
  • 10
    I think programming language generations SHOULD somehow correspond to jet fighter generations. This amount of awesomeness seems sufficient to justify an RFC on the subject. Jan 5, 2015 at 15:27
  • 11
    Ah, this brings back memories, back when fifth generation languages would soon be so easy to use that most programmers would be out of a job. Jan 5, 2015 at 16:45
  • 5
    @Izkata A 1GL is binary machine code (e.g. the amd64 instruction set). A 2GL is an textual assembly language that provides mnemonics for machine code (e.g. GAS). A 3GL is something that abstracts over machine instructions. Fortran was the first to do this by allowing programmers to use expressions and variables such as (I + 7) * 3. However, there's no consensus on where the 3GL category ends, and what 4GL and 5GL are specifically supposed to mean.
    – amon
    Jan 5, 2015 at 17:17
  • 5
    "Some nitwits even think that Java ... belongs in the same “3GL” category as Fortran ..." -- whereas other nitwits believe that if two things appear very different to them, then there cannot exist a classification scheme which groups them together according to whatever criteria are relevant to that scheme? ;-p Jan 6, 2015 at 12:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.