You are on page 1of 3

Ananda college ,Colombo 10.

ICT-Grade 11
Evolution of computer languages
1. 1st Generation languages. (Machine Language)
 Programs written in machine code. (Using 0 and 1)
 Too many instructions
 Machine dependent language
 Programmer should know the hardware platform of the computer.
 Translator was not wanted.
 Program processing speed is fast.

2. 2nd Generation languages. (Assembly Language/ symbolic languages)


 Less instructions
 Called symbolic languages
 symbols were used in the programs. (Mnemonics – Memory aids)
 A special translator called assembler is used to convert the symbols into machine language.
 Processing speed is slower than 1st GL
 Machine dependent language

3. 3rd Generation languages. (high level Languages)


 Program writing is less complex because of the vocabulary which is easy and simple to learn.
 Error diagnostic messages given and easy to test.
 Machine independent.
 Training a programmer is easy.
 Needs a translator.

4. 4th Generation languages. (Artificial Intelligence)


 Used to Program computers to make decisions in real life situations.
 Most common languages are LISP (List Processor), Prolog.

Programming Language translators.


Translators are computer programs that translate text written in a high level language into machine
language. The original program is called the source code and the translated program called object
code.
There are 3 types of language translators.

 Assembler
 Compiler
 Interpreter
Compiler
A compiler translates all the programming statements of the high level program into machine
language, which is then executed at once.
After the program is translated to machine code once, it can be executed any number of times. A
translation is needed again only if the source code is changed.
Interpreter
Translates program statement by statement of the high level language into machine language.
An interpreter translates code each time the program is executed.
An interpreter slows down the execution speed of a program to some extent.

Types of sub program

Evaluation of Programming language, Types of sub program, Internet & Email


Ananda college ,Colombo 10. ICT-Grade 11
Using a sub programmes make it easier to write, read and maintain a programme where you have
number of sub processes. There are two types of sub programmes,
 Function – A sub programme which returns an output back to the main program.
Syntax to define a function.
Function < name of the function> ( var <name of the variable> : <data type>) <Data type>);
Ex:- Function Calculatearea(var radius: real) real);

 Procedure – A sub programme which does not return an output back to the main programme.
Syntax to define a procedure.
Procedure <name of the procedure> ( var <name of the variable> : <Data type>);
Ex : - Procedure calculatearea(var radius:real);
Before starting the main program, functions or procedures should be declared. Sub programs can be
called in the main program.
Programming Language Paradigms (Types)
Program Paradigms are away to classify programming languages based on the features of various
programming languages. As examples programming languages can be classify into various
paradigms according to execution methods, the way that code is organized, the style of syntax and
grammar.
There are two main programming paradigms.
 Imperative method - They state the order in which operations occur. (you tell the compiler
what you want to happen, step by step)(How you want)
Ex:- Procedural Languages, Object oriented languages, Parallel Processing

 Declarative Method -  do not state the order in which to execute operations. (you write code
that describes what you want, but not necessarily how to get it (declare your desired results,
but not the step-by-step))(What you want)
Ex:- Logic, Functional data flow, Databases
Difference between procedural and declarative Paradigms.
 Procedural language – Computer language which consists of a well structured set of steps
and procedures. This includes statements for problem solving steps. Ex – Pascal
 Declarative Programming – Program is designed to solve problems explaining what you
want rather than stating how to solve the problem as in primary programming languages.
Computer is providing only what the problem and the required solutions are, not how to solve
it.
Difference between structured and object oriented paradigms.
 Structured Programming languages - is a programming paradigm aimed at improving the
clarity, quality, and development time of a computer program by making extensive use of
subroutines, block structures, for and while loops(Structured programming facilitates
program understanding and modification and has a top-down design approach.) Ex: - C
Language
 Object oriented Programming Languages - is a programming paradigm based on the
concept of "objects", which are data structures that contain data, in the form of fields, often
known as attributes; and code, in the form of procedures, often known as methods.
Ex :- C++ Language

Difference between programming and scripting


Difference between the two is that scripting languages do not require the compilation step
and are rather interpreted. For example, normally, a C program needs to be compiled before

Evaluation of Programming language, Types of sub program, Internet & Email


Ananda college ,Colombo 10. ICT-Grade 11
running whereas normally, a scripting language like JavaScript or PHP need not be
compiled.

Evaluation of Programming language, Types of sub program, Internet & Email

You might also like