1 12 2

peanutunderwearSoftware and s/w Development

Nov 7, 2013 (4 years and 6 days ago)

68 views

U
U
N
N
I
I
T
T


1
1
2
2


PROGRAMMING LANGUAGES





Start
-
up


A.

Write down any programming languages you know
:

…………………………………………………………………………………
…………………………………………………………………………………
…………………………………………………………………………………..

B.

How are a program and a programming language related?


C.

Fill in the g
aps using the words in the box:

i
mperative, program,

everything,
commands

There is an old saying that "A Real Programmer can
…….
………..FORTRAN in
any language." This means that you can use

………..
……..
techniques in almost
any language. However, this is seldom

wise. (FORTRAN is the
archetypical

imperative language)

The language

mentioned
above is
geared towards the idea of "imperative
programming" where you give the computer
…………
…………
and you have to
decide almost
……
……..
……
Programs look like "First do this. Then d
o that. Store

the result of that over there.”
and so on.

IT English

10

Reading

Programming language
s

Computer programs

(also
software

programs
, or just
programs
) are
instructions

for a
computer
. A computer requires programs to function. Moreover, a compute
r
program does not run unless its instructions are executed by a
central processor
;
however, a program may communicate an
algorithm

to people without running.
Computer programs are usually
executable

programs or the
source code

from
which executable programs are derived

Computer source code is often written by professional
comput
er programmers
.
Source code is written in a
programming language
.

The question is how a com
puter
can understand a language.

It would be ideal if natural languages
could be used, but
as they are too complicated, this cannot be done for the present. This is the reason
why scientists created specific symbols to develop programs and that is how the
programming languages emerged.

A
programming language

usually follows one of two main
paradigms

(see exercise
A
)
:
imperative

or
declarative

programming

(
see exercise
D
)
. Source code may be
converted into an
executable file

(sometimes called an executable program or a
binary) by a
compiler
1
. Alternatively, computer pr
ograms may be executed by a
central processing unit

with the aid of an
interpreter
2
, or may be
embedded

directly
into
hardware
.






1

A compiler tra
nslates the source code into object code, that is it converts the entire
program into machine code in one go

2

An
interpreter

normally
translates the source code line by line as the program is running


Unit

12
. Programming Languages

11


History of programming languages

Before 1940

The first programming languages predate the modern computer. At first, the
languages were
codes
.
Herman Hollerith

realized that he could encode information
on
punch cards
.
In the first decades of the twentieth century, numerical calculations
were bas
ed on decimal numbers. Eventually it was realized that logic could be
represented with numbers, as well as with words.

The 1940s

In the 1940s the first recognizably modern, electrically powered computers were
created. The limited speed and memory capacity

forced programmers to write hand
tuned
assembly language

programs. It was soon discovered that programming in
assembly language required a great deal of intellectual eff
ort and was error
-
prone.

Some important languages that were developed in this period include:
Plankalkül

(
Konrad Zuse
)
,

-

ENIAC coding system
, and

C
-
10

The 1950s and 1960s

In the
1950s

the first three modern programming languages whose descendants a
re
still in widespread use today were designed:

FORTRAN
, the "
FOR
mula
TRAN
slator,
LISP
, the "
LIS
t
P
rocessor",
COBOL
, the
CO
mmon
B
usiness
O
riented
L
anguage
.


Low
-
level language

Compiler or
inte
rp
reter

assembler

Machine code (binary)

Hardware

High
-
level language (Basic, C, Java, etc.)

IT English

12

1967
-
1978: establishing fundamental parad
igms

The period from the late 1960s to the late 1970s brought a major flowering of
programming languages. Most of the major language paradigms now in use were
invented in this period:

Simula
, was the first language designed to support
object
-
oriented programming
.

C
, was
an early
systems programming

language
.
Smalltalk

provided a complete ground
-
up design of an object
-
oriented language.

Prolog

was
the first
logic programming

language.

Some important languages that were developed in this period include:

Pascal
,
Forth
,
C
,
Smalltalk
,
Prolog
,

ML
,
SQL


The 1980s: consolidation, modules, performance

The 1980s were years of relative consolidation.
C++

combined object
-
oriented and
systems programming. However, one important new trend in language design was
an increased focus on programming for large
-
scale systems through the use of
modules
, or large
-
scale organizational units of code

Although major new p
aradigms for programming languages did not appear, many
researchers expanded on the ideas of prior languages and adapted them to new
contexts. Language technology continued along these lines well into the
1990s.Some important languages that were developed
in this period include:

Ada
,
C++
,
Eiffel
,
Perl
,
FL

(Backus)

The 1990s: the Int
ernet age

The 1990s saw no fundamental novelty, but much recombination as well as
maturation of old ideas. A big driving philosophy was programmer productivity.
Many "rapid application development" languages emerged, which usually came
with an IDE, garbage

collection, and were descendants of older languages. All such
languages were object
-
oriented. These included Object Pascal, Visual Basic, and
C#. Java was a more conservative language that also featured garbage collection
and received much attention. More

radical and innovative than the RAD languages
were the new scripting languages. These did not directly descend from other
languages and featured new syntaxes and more liberal incorporation of features.
Some important languages that were developed in this
period include:
Haskell
,
Pyt
hon
,
Java
,
Ruby
Lua
A
,
NSI
,

Common Lisp

JavaScr
ipt
,
PHP
,
C#
,
JavaFX Script


Comprehension and V
ocabulary
E
xercises

A
.
State whether the following statements are true or false:

1.

A computer cannot function without a software program



Unit

12
. Programming Languages

13

2.

Computer programs are executed only by the interpreter



3.

The first programming languages were codes



4.

Assembly languages were difficult to understand and easy to failure




5.

The limited speed and memory capacity of the first computers led to the
developme
nt of the assembly languages



6.

During the 1950s the focus was on programming for large
-
scale systems
through modules



7.

The focus in the ‘90s was on productivity



8.

The need for specific symbols to create programs emerged from the
complexity of natural langu
ages



9.

The very first languages encoded information on punch cards





B.
Put the words

below

in the correct
column (
chronological order
)
:

RAD languages,
FORTRAN
, COBOL
,

PASCAL, m
o
dules,
punch cards,
combination of object
-
oriented and systems programming, Java,

assembly
language
,
Python, new scripting languages
,

co
des


Before/after
1940s







50s
-
60s

1967
-
78

1980s

1990s

C.
Fill in the blanks with the appropriate verb:

d
iffer, represent, compose, compare

A
programming paradigm

is a fundamental style of
computer programming
.
(…
………
……with a
methodology
, which is a style of solving specific
software
engineering

problems). Paradigms …
..………..
….in the concepts and abstractions
used to ……
…….
…..the elements of a program (such as objects, functions,
variables, constraints, e
tc.) and the steps that …
……
…………a computation
(assignation, evaluation, continuations, data flows, etc.).


IT English

14

D. Fill in the gaps with the appropriate verb:

c
hange, describes, define, perform, expresses,

needs

In
computer science
,
imperative programming

is a
programming paradigm

that ………
….
….

computation in terms of
statements

that ……
…..
….

a
program
state
. In much the same way as the
imperative mood

in
natural
languages

……

…….

commands to take action, imperative programs
……
….
….

sequences of commands for the computer to………

...The
term is used in opposition to
declarative

programming
, which expresses
what

………
…..
to be done, without
prescribing
how

to do it in terms of
sequences of actions to be taken
.


E.
Choose the right meaning of the following phrases

1.
a program may
communicate an
algorithm

to people

a. convey an algorithm
to people

b. unfold

c. publish

2.
a more conservative language that
also featured garbage collection

a.
presented garbage collection

b. paid attention to garbage collection

c. neglected garbage collection

3.
m
any researchers
expanded on the ideas of prior languages

a. improved prior languages


b. exploited prior languages


c. based on prior languages

F
. Match the words in the two columns:

1.
imperative


a.
extremely urgent or important; essential

2.
radical


b.

essential, fundamental

3.
capacity


c.
new or unusual experience or occurrence

4.
novelty

d.
the maximum amount something can contain, the
ability to understand or learn

Unit

12
. Programming Languages

15

G
.
Match the words in the two columns:

1.

interpret

2.

communicate

3.

e
xecute

4.

embed

5.

calculate

6.

adapt

a.

compute, count, estimate


b.

p
erform, accomplish

c
.

exchange (thoughts, feelings, or ideas
)

d.

translate

e.

implant, dig in
.

f
.

to adjust (someone or something, esp. oneself) to
different conditions, a new environment

Language Development

Fill i
n the gaps with the appropriate derivatives
or correct form
of the
following words:

I
nstruct

1.

Our physics ……..
………
explained the principles of Thermodynamics

2.

We were ……
………….
to document our programs very carefully

3.

Following the …………
……
I could operate the compu
ter

Compile

1.

Usually a programmer …………
……
his program before he puts in the data

2.

A source program cannot be directly processed by the computer until it has
been……
…………

3.

Our computer at home does not have a………
………..

Communicate

1.

I do not think
the professor …………
………
his thoughts clearly

2.

Radio and television are important means of……………
……

3.

I am afraid this is
not
a………
……….
.
language

Execute

1.

As a pianist his …………
…..

is poor.

2.

The plan was good but it was badly………
……..

3.

He is a man of great ………
………
abilities