Thursday, August 21, 2008

3GL V2.0

I have been learning how to use ActionScript for Adobe CS 3 Flash this afternoon, and the thought has occurred to me that Third Generation Languages (3GL's) as in programming language should now evolve to the next level. That is not to say that they should become 4GL's in the traditional sense. This will take some explanation...

Firstly my understanding of the 'Generations of Languages':

1GL - A language based entirely on bits, bytes and hexadecimal representation - i.e. 4F 3D 10 3A 0E 35 6B and so on, the pure numbers that represent the Op codes and associated data (if any) that tell the CPU what gates to open and close (via Microcode) in order to perform the operation that the hexadecimal number represents. Each 1GL language is purely dependent upon the architecture of CPU for which it is destined. So a 1GL for a Z80 will not be the same as an 8086 or a 68000 - which incidentally is the only processor I actually programmed using its 2GL form.

2GL - The human readable form of a 1GL - Assembly language that is converted into 1GL by the Assembler. For example 'MOV AX, BX'. Again, completely tied to the architecture of the processor - this can mean a whole family, 8086, 8088, 80286, 80386, 80486, Pentium, Pentium 2 ... Intel(R) Core(TM)2 Duo E4600 ... and so on

3GL - Semi-architecture independent human readable programming language. That is converted into a 2GL by a compiler or interpreter, then assembled (with an assembler) into one or more object files that are then bound together by a linker to form an executable file (or library) which can then be run by the 'loader' of the operating system for the architecture of computer you have - I must state that library files are useless without an executable to 'call' functions within them. Examples: C, C++, Java, Ada, Modula 2, Logo, Pascal, COBOL, SmallTalk, ALGOL, BASIC, Lisp, Fortran etc. And despite arguments, HTML is not really a 3GL in my eyes, it is really a set of symbols and data that 'configure' a web browser to display something. HTML does not really make 'decisions' or can be used to make an entirely new piece of software - it is dependent on the web browser. Given this, Java could be in the same camp for being interpreted by the Java Virtual Machine - which is the nearest 3GL I am aware of to being Architecture / Operating System independent.

4GL - Human readable, capable of inferring logic. Having only done a bit of ProLog, this is where my knowledge is a bit hazy.

So, that is a definition, not fully complete, but should be sufficient for this post. Right, what I am getting at is the need to move 3GL's on so that they have more and more common syntax and semantics. I have been able to get to grips with ActionScript because it shares common traits with C++ and Java with the concept of Objects and dot notation. But again, it is subtlety different. This is becoming 'frustrating' for an aging man who's powers of assimilation are not what they used to be, despite having programmed since the age of ten on and off in: Basic, COBOL, Pascal, Modula 2, Ada, 68000 assembler, C, C++ and Java with a bit of ProLog chucked in for good measure. And has learn't to create web pages in pure HTML with CSS - having a go at PHP too.

The foundations for modern Object Orientated 3GLs have been established (thanks to SmallTalk), so, I believe it is time to standardize the syntax and semantics across the languages to make the process of Software Engineering easier to perform. I am not advocating a language to 'rule them all', because each language has its place and main purpose in solving a particular set of problems - targeting specific needs of the user.

No comments: