mr. mubashir ali lecturer (dept. of computer science)€¦ · 1. programming language •a set of...

26
Introduction to Programming Languages Mr. Mubashir Ali Lecturer (Dept. of Computer Science) [email protected] 1 Lecture 02

Upload: others

Post on 09-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

Introduction to Programming Languages

Mr. Mubashir AliLecturer (Dept. of Computer Science)

[email protected]

1

Lecture 02

Page 2: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

Outline

• Programming Language

• Types of Languages

• Language Categories

• Language Levels

• Language Translators

• Programming Errors

Mubashir Ali - Lecturer (Department of Computer Science)

2

Page 3: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

1. Programming Language

• A set of instructions given to computer tosolve a specific problem is called Program.

• Programming Language is Language that isused to write computer Programs.

• Programming languages can be used to createprograms or software's that implementspecific algorithms.

Mubashir Ali - Lecturer (Department of Computer Science)

3

Page 4: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

2. Types

• High Level Languages (Near to Human)

• Low Level Languages (Near to Computer)

Mubashir Ali - Lecturer (Department of Computer Science)

4

Page 5: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3. Categories

• This is a list of notable programming languages,grouped by Category.

• Because there is no overarching classificationscheme for programming languages, in manycases a language will be listed under multipleheadings.

Mubashir Ali - Lecturer (Department of Computer Science)

5

Page 6: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.1 Array Programming Languages

• Array programming (also knownas vector or multidimensional) languagesgeneralize operations on scalars to applytransparently to vectors, matrices, and higher-dimensional arrays.

• A+, Fortran, APL, MATLAB, Freemat, Analyticaetc

Mubashir Ali - Lecturer (Department of Computer Science)

6

Page 7: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.2 Authoring Languages

• An authoring language is a programminglanguage used to create tutorials, websites, andother interactive computer programs.

• Bigwig , DITA, Lasso, PILOT, TUTOR

Mubashir Ali - Lecturer (Department of Computer Science)

7

Page 8: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.3 Constraint Programming Languages

• A constraint programming language isa declarative programming language whererelationships between variables are expressedas constraints. Execution proceeds byattempting to find values for the variableswhich satisfy all declared constraints.

• Prolog, Eclipse, OZ, Claire, YAP etc

Mubashir Ali - Lecturer (Department of Computer Science)

8

Page 9: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.4 Command Line Interface Languages

• Command-line interface (CLI) languages arealso called batch languages or job controllanguages.

• 4DOS, Bash, JCL etc

Mubashir Ali - Lecturer (Department of Computer Science)

9

Page 10: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.5 Compiled Languages

• These are languages typically processedby compilers. Compilers are basically languagetranslators.

• C, C++, C#, ADA, ALGOL, COBOL, Cobra, VisualBasic, SWIFT, RPG, Python, Java, Simula etc

Mubashir Ali - Lecturer (Department of Computer Science)

10

Page 11: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.6 Concurrent Languages

• Message passing languages provide languageconstructs for concurrency and system (OS)programming.

• ADA, Alaf, Cury, Java, Julia, Pony, SR etc

Mubashir Ali - Lecturer (Department of Computer Science)

11

Page 12: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.7 Data Oriented Languages

• Data-oriented languages provide powerful waysof searching and manipulating the relationsthat have been described as entity relationshiptables which map one set of things into othersets.

• SQL, SPARQL, WebQL, RDQL

Mubashir Ali - Lecturer (Department of Computer Science)

12

Page 13: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.8 Data Structured Languages

• Data-structured languages are those wherelogic is structured in ways similar to their data.Such languages are generally well suited toreflection and introspection.

• Array-based, List-based, Stack-based

Mubashir Ali - Lecturer (Department of Computer Science)

13

Page 14: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.9 Decision Table Languages

• Decision tables can be used as an aid toclarifying the logic before writing a program inany language, but in the 1960s a number oflanguages were developed where the mainlogic is expressed directly in the form of adecision table.

• Filetab

Mubashir Ali - Lecturer (Department of Computer Science)

14

Page 15: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.10 Decision Table Languages

• Declarative languages describe a problemrather than defining a solution. Declarativeprogramming stands in contrast to imperativeprogramming via imperative programminglanguages, where serial orders (imperatives) aregiven to a computer.

• Analytica, MetaPost, Wolfram etc

Mubashir Ali - Lecturer (Department of Computer Science)

15

Page 16: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.11 Embeddable Languages

• Source embeddable languages embed small pieces of executable code inside a piece of free-form text, often a web page.

• Client-side embedded languages aim to provide dynamism to web pages without the need to recontact the server. (JavaScript, VBScript, ActionScript)

• Server-side embedded languages are much more flexible and used to manipulate server.(PHP, Java, ASP.Net)

Mubashir Ali - Lecturer (Department of Computer Science)

16

Page 17: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.12 Extension Languages

• Extension programming languages arelanguages embedded into another program andused to harness its features in extension scripts.

• CAL, Guile, Lua, Perl, Ruby, Pike etc

Mubashir Ali - Lecturer (Department of Computer Science)

17

Page 18: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.13 Extension Languages

• Fourth-generation programming languages arehigh-level languages built around databasesystems. They are generally used in commercialenvironments.

• FOCUS, Link 4GL, Progress 4GL, SAS, xBase etc

Mubashir Ali - Lecturer (Department of Computer Science)

18

Page 19: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.14 Extension Languages

• In electronics, a Hardware descriptionlanguage or HDL is a specialized computerlanguage used to describe the structure, designand operation of electronic circuits, and mostcommonly, digital logic circuits. The two mostwidely used and well-supported HDL varietiesused in industry are Verilog and VHDL.

• Verilog-AMS, VHDL-AMS, VLLA, LAVA, SystemC

Mubashir Ali - Lecturer (Department of Computer Science)

19

Page 20: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.15 Interpreted Languages

• Interpreted languages are programminglanguages in which programs may be executedfrom source code form, by an interpreter.

• Basic, JavaScript, LISP, PHP, Ruby etc

Mubashir Ali - Lecturer (Department of Computer Science)

20

Page 21: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

3.16 Multiparadigm Languages

• Multiparadigm languages support more thanone programming paradigm. They allowa program to use more thanone programming style. The goal is to allowprogrammers to use the best tool for a job,admitting that no one paradigm solves allproblems in the easiest or most efficient way.

• ADA, Beta, Delphi, F#, PHP, SWIFT etc

Mubashir Ali - Lecturer (Department of Computer Science)

21

Page 22: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

4. Language Code Levels

• Procedural Programming

• Object Oriented Programming

• MVC Programming

Mubashir Ali - Lecturer (Department of Computer Science)

22

Page 23: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

5. Language Translators

• Compilers

• Interpreters

• Assemblers

Mubashir Ali - Lecturer (Department of Computer Science)

23

Page 24: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

6. Programming Errors

• Syntax Errors

• Logical Errors

• Run Time Errors

Mubashir Ali - Lecturer (Department of Computer Science)

24

Page 25: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

Summary

• Programming Language

• Types of Languages

• Language Categories

• Language Levels

• Language Translators

• Programming Errors

Mubashir Ali - Lecturer (Department of Computer Science)

25

Page 26: Mr. Mubashir Ali Lecturer (Dept. of Computer Science)€¦ · 1. Programming Language •A set of instructions given to computer to solve a specific problem is called Program. •Programming

References

• https://en.wikipedia.org/wiki/Programming_language

• https://en.wikipedia.org/wiki/List_of_programming_languages_by_type

• https://en.wikipedia.org/wiki/Translator_(computing)

• https://www.inf.unibz.it/~calvanese/teaching/05-06-ip/lecture-notes/uni10/node2.html

Mubashir Ali - Lecturer (Department of Computer Science)

26