[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Wed May 21 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

221.0. "1GL and 2GL Definition " by MSDSWS::SECRIST (Walk like a res-i-dent...) Tue Jan 31 1989 16:31

	If common computer languages are 3GLs, what are 1 and 2 GLs,
	respectively ?  Straight opcodes and assembly/macro ?

	rcs
T.RTitleUserPersonal
Name
DateLines
221.1The way it used to be...ATLAST::WELTONProduct of the Elvis Sperm BankThu Feb 02 1989 14:2744
         First generation languages were expemplified (sp?) by some of the
         following characteristics:

         	"Primitive" control structures - In general the control
         	structures of early FORTRAN corresponded almost 1-2-1
         	with the branch instructions in the IBM 704.  1st generation
         	languages also relied heavily on the GOTO to by control 
         	structures.  Recursion was also not found.

         	Data Structures -  The types of data were basically patterned
         	after the layout of memory.  Constructors for Records and
         	abstract data types were not present in 1gl's.  Weak typing
         	was the rule of the day.

         	Hiearchical structures and Naming - No "scope of variables" was
         	to be found.

         	Card-Oriented Syntax - Statements in languages were bound
         	by the need to fit on that 80-column thing.
                                                    
         Second generation had some of these characteristics:

         	Data Structures - Data constructors became more generalized
         	(e.g.,  Arrays could have a lower bound other than 1). 
         	Built-in data types had stronger type checking, but by and
         	large things still looked like the 1st generation days.

         	Name Structures - "Scope of variables was born." Hierarchical
         	nesting of "name-able" object (e.g., variables and routines)
         	provided better control of the name space and efficient
         	dynamic space allocation.  In other words, Block structures
         	and concept were born.

         	Control structures -  Recursion appeared.  Programmers were
         	also given a choice of parameter passing modes.  "Structured"
         	control structures eliminated some of the confusing uses of
         	the GOTO statement.

         	Coding formats -  Free formatted code allowed the programmer to
         	break out of the restrictions imposed by the "Card."  Also
         	languages with keyword or reserved-word policies were replaced
                by languages that diagnosed keyword meaning from the context
         	of it's use.
221.2some examplesSAUTER::SAUTERJohn SauterThu Feb 02 1989 15:135
    Using the definitions in 221.1, the standard first-generation language
    was FORTRAN II, whereas the standard second-generation language was
    Algol-60.  Apparently, assembler and binary coding are not considered
    "generations" (or perhaps not considered "languages").
        John Sauter
221.3Then came assemblers, and later, macros.VISA::MONAHANhumanity is a trojan horseSun Feb 05 1989 03:413
    	I always thought octal was a first-generation language. You could
    actually specify a PDP-8 op-code by typing a digit, instead of having
    to set all 3 bits individually on the front panel.
221.4What's a little syntax between friends...ATLAST::WELTONProduct of the Elvis Sperm BankMon Feb 06 1989 09:1013
    
         I think Assembly language fall nicely into my definition of
         a 1GL. Essential differences between Assembly language and
         FORTRAN include:
         
         * The amount of control the user had over memory allocation
         
         * The number of machine instructions produced by one FORTRAN,
           LISP, COBOL, Etc. statement and the number of instructions
           produced by one assembly language statement.
         
         
         douglas
221.51, 2, 3, GO!!!CASEE::CLARKWard ClarkWed Feb 08 1989 16:2722
    My language generation yardstick says ...

	1GL - one statement generates one machine op, ...

	      e.g., assembler

	2GL - one statement generates many machine ops
	      primitive control structures: IF (but not IF-THEN-ELSE), GOTO, ...
	      implicit declaration
	      error-prone

	      e.g., FORTRAN, SNOBOL4, Macro Assembler (?)

	3GL - block-oriented control structures
	      explicit declaration

	      ALGOL, all the ALGOL-like languages

    Of course, lots of the original 2GLs have been one-plussed into
    quasi-3GLs.

    -- Ward
221.6HAMPS::PHILPOTT_ICol. Philpott is back in action...Thu Feb 09 1989 07:3127
    
    My comp science instructor at university used the following:
    
    1GL: 1:1 relationship between language statements and machine code
    
    2GL: 1:1 relationship between language flow control and machine
    control statements (eg autocode).   
    
    The example he used was, in a 3GL, the step:-
    
    		Y = SQRT(b^2 - 4*a*c)
    
    in autocode (where you do one thing at a time) you have
    
    		T := 4*a
    		T := T*c
    		S := b*b
    		S := S-T
    		Y := SQR(S)
    
    and of course in macro you have a lot of moving of things in and
    out of registers...
    
    /. Ian .\
    
    
    
221.7autocode - beware terminologyCOMICS::DEMORGANRichard De Morgan, UK CSC/CSThu Feb 09 1989 08:508
    Re .6
    
    Beware of the term "autocode". Mercury Autocode allowed (reasonably)
    complex expressions (whereas Elliott 803 Autocode did not). Atlas
    Autocode on the other hand was derived from Algol 58 (it (AA) had a
    call-by-reference instead of call-by-name, block structure, if
    ... then (but not if ... then ... else), passing procedures as
    parameters etc.)
221.8ah yes, a blast from the past...ODIHAM::PHILPOTT_ICol. Philpott is back in action...Tue Feb 14 1989 05:116
    
    Thanks Richard - it was Elliott 803 I had in mind - it was the first
    computer programming language I learned and used (back in my 6th
    form days...)
    
    /. Ian .\
221.9True "Generations"CAIRN::HARRISWed Mar 08 1989 10:5627
None of these are the "classic" definition of language generations that I grew
up with.  These would be:

First: Binary - you code the machine in bits (or octal, or hex) as appropriate.

Second: Symbolic - What we would call assembly language.  Addresses have
symbolic names, resolved by the assembler.  The instructions themselves have
symbolic names.  MACROs were a late development, not related to generations.

Third: All, so called, Higher Level languages.  From Fortran II to Algol to
Pascal to Ada to Lisp, etc.

In each "generation", programming effectiveness took a quantum leap, at least a
factor of 10.  In this scheme, the "accepted" definition of 4th generation
languages are really a misnomer - they are just varieties of 3GL.  On the other
hand, the name "4th Generation Language" was coined in response to the
extraordinary amount of coding required in COBOL to access databases - which
was, and still is in many commercial shops, the bread and butter programming.
In this sense, languages like Datatrieve and Rally are indeed a quantum leap in
programming technology.

For my money, the true "Fourth Generation" would be language systems that aren't
text based.  Examples are Spreadsheets, Hypertext systems, and graphical
programming systems like the Cobol program generator, and the Project Manager
(PM) product.  CAD/CAM systems would be another example.  If RUNOFF is a 3rd
generation text manipulation language, then WYSIWYG editors are 4th generation.
									-Kevin
221.10getting closerCOOKIE::R_TAYLORRichard TaylorWed Mar 08 1989 14:4920
    The last definition of 1GL and 2GL is better.  Originally computers
    were programmed in binary.  For example look in the Turing conference
    room in ZKO to see a binary program.  Some of my first assembly coding
    defined each field in octal rather than with a mnemonic. 
    
    The 3GL is correct up to a point.  3GLs are procedural, you tell the
    computer what to do to provide the answer.  4GLs are non procedural,
    you state the form of the answer and the computer works out how to do
    it.  Just having to give a definition of the required answer can
    improve productivity by an order of magnitude, and there are documented
    examples. 
    
    An early 4GL was RPG.  You state the form of a report and the computer
    produced it.  RPG III ruined this by allowing procedural programming,
    the productivity of the language plummeted and the language died out. 
    
    Speculation: A 5GL programming system knows has context about the
    envionment so it is not even necessary to specify everything about the
    desired result.  A 6GL will produce the answer before you even know   
    that you need it.