Programming Languages Flashcards ionicons-v5-c

What is a Programming Language ?

-A programming language is a set of rules that provides a way of telling a computer what operations to perform.-A programming language is a set of rules for communicating an algorithm.-It provides a linguistic framework for describing computations.

A programming language is :

-A notational system for describing computation in a machine-readable and human-readable form.-A tool for developping executable models for a class of problem domains.

Programming Language has a set of syntax rules

-English is a natural language, it has word, symbols and grammatical rules.-A programming language also has words, symbols and rules of grammar.-The grammatical rules are called syntax.-Each programming language has a different set of syntax rules.

Why are there so many programming languages ?

Why does some people speak Frensh ? -Programming languags have evolved over time as bettr ways have been developped to design them. -First programming language were developed in the 1950s. -Since then thousands of languages have been developed. -Different programming language are designed for different types of programs.

Levels of programming languages

1-High level program.2-Low level program.3-Executable Machine code.

What are the types of Programming languages ?

- First generation languages. Machine language : Operation code - Such as addition or substraction.Operands - that identify the data to be processed.Machine language is machine dependent as it is the only language the computer can understand.It is very efficient code but ( Very Difficult to write )

Second generation languages

- Assembly languages.-Symbolic opeartion codes replaced binary operation codes.-Assembly language programs needed to be 'assembled' for execution by the computer.-Each assembly language instruction is translated into one machine language instruction.-Very efficient code and easier to write.

Third generation languages

-Closer to English but included simple mathematical notation. -Programs written in source code which must be translated into machine language programs called object code. -The translation of source code to object code is accomplished by machine language system program called Compiler. -Alternative to compilation is interpretation which is accomplished by a system program called an Interpreter.examples : Visual Basic, Fortran , C and C++, Java.

Fourth generation languages

-A high level generation that requires fewer instructions to accomplish a task than a third generation language.-Used with databases : - Query langauges. - Report generators. - Forms designers. - Application generators.

Fifth generation languages

- Declarative lannguages .-Functional(?) : List, SML. - Also called applicative : everything is a function.Example : Prolog. - Based on mathematical logic. - Rule- or Constraint-based.

A language is a language

Programming languages are languages, when it comes to machanics of the task, learning to speak and use a programming language is in many ways like learning to speak a human language.-In both kind of languages you have to learn new vocabulary, syntax and semantics.-Both kind of language require considerable practie to make perfect.

Humain language Vs Programming language

Computer languages lack ambiguity and vagueness. - In English sentences such as I SAW THE MAN WITH A TELESCOPE .. who hade the telescope ?. - In a programming language a sentence, instruction. either means one thing or it means nothing !!!

Criteria in a good language design

Writablillity.Readabillity.Orthogonality.Reliability.Maintainability.Generality.Uniformity.Exsentibility.Standardability.Implementability.

Writablillity

The quality of a language that enables a programmer to use it to express a computation clearly, correctly, concisely, and quickly

Readability

The quality that enables a programmer to understand and comprehend the nature of a computation easily and accurately

Orthogonality

The quality of a language that features provided have as few restrictions as possible and be combinable in any meaningful way

Reliability

The quality of a language that assures a program will not behave in unexpected or disastrous ways during execution

Maintainability

The quality of a language that eases errors can be found and corrected and new features added

Genrality

the quality that avoids special cases in the availability or use of constructs and by combining closely related constructs into a signe more general one

Uniformity

The quality of a language that simila features should look similar and behave similar

Exstensibility

The quality of a language that provides some general mechanism for the use to add new constructs to a language

Standardability

The quality that allows programs written to be transported from one computer to another whitout significant change in language structure

Implementability

The quality that provides a translator or interpreter can be written, this can address to complexity to the language definition