Friday, January 8, 2010

What are the categories of programming languages?

Can you help me with my school project? What are the different categories of languages under 3rd and 4th generation programming languages?What are the categories of programming languages?
I don't know of any inside categories in the 3rd and 4th generation, but I did here about this categorizing stuff.





In the first level there is the machine code itself represeneted by 1's and 0's.





In the second level there is the assembly which is a more symbolic representation of the machine code. Examples to commands in assembly are:


mov eax, ecx


xor ebx, ebx


Every basic command is called an opcode. opcodes differ from one platform to another.





In the third levels there are compiler languages. That means that you write your code, compile (build) it using a compiler that converts your code to assembly. In C, and C++ for instance you have compilers like gcc and gxx to compile your code to an ';exe'; or wrap it in a ';so\dll (In windows)';. That means that for every i++ that you write, the compiler changes it to: get value of variable from the memory, increase it by one and write it back to memory. Compilers also differs between platforms.


Java is a special 3rd generation languages, because the ';compiler'; build your plain ';.java'; code to ';.class'; code - which is called bytecode. The computer itself doesn't run the bytecode, it's not an assembly. The byte code is run by a special program called the Java Virtual Machine. The same is for .NET and the CLR.


A main difference between C and PASCAL languages and C++,Java,.Net, is that the first is a procedural language and the last are object oriented languages (OO). In C and PASCAL one may write procedures, that he may call in the flow of the program, whether in C++ and Java the programmer have objects, and each Object has it's properties and capibilities and the code just describe the flow of objects using one another.





The forth level languages are interperter languages - like Python and Rubie and even Pearl. You have a main running enviornment - an interperter, that recieve code from the programmer, and interpert and execute the code line by line, without compiling the code first. This allows the user the adventage of changing his code on the spot, and see how the flow changes, without having to compiling all the time.





When you go from 1st and 2nd generations to the 3rd and 4th generations, it's said that you move from low level languages to high level languages - On one hand the code is closer to the way that people understand the world, but on the other hand it's less efficient.





It's said that for big applications one should use 3rd generation, for things that need acceleration one should use 2th generation and for small applications one should use 4th generations. But there are many exceptions.What are the categories of programming languages?
You mean like C++, perl, java, python?

1 comment: