What is a programming language?

Similar documents
Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Chapter 1. Preliminaries

Chapter 1 Preliminaries

Chapter 1. Preliminaries

Concepts of Programming Languages

Programming Languages 2nd edition Tucker and Noonan"

Principles of Programming Languages. Lecture Outline

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Programming Languages, Summary CSC419; Odelia Schwartz

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Introduction. A. Bellaachia Page: 1

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Programming Paradigms

Administration Computers Software Algorithms Programming Languages

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

Concepts in Programming Languages

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++ Performance, memory

An Introduction to Software Engineering. David Greenstein Monta Vista High School

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

Chapter 9. Introduction to High-Level Language Programming. INVITATION TO Computer Science

Seminar in Programming Languages

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages

Introduction to Programming

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code

Compilation I. Hwansoo Han

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

Concepts of Programming Languages

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

IA010: Principles of Programming Languages

Overview. Rationale Division of labour between script and C++ Choice of language(s) Interfacing to C++

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

Programmiersprachen (Programming Languages)

Chapter 5. Names, Bindings, and Scopes

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Design & Implementation Overview

INSTITUTE OF AERONAUTICAL ENGINEERING

Chapter 2. Evolution of the Major Programming Languages

Com S 541. Programming Languages I

Early computers (1940s) cost millions of dollars and were programmed in machine language. less error-prone method needed

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

Programming Languages FILS Andrei Vasilateanu

Programming Languages, Introduction CSC419; Odelia Schwartz

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

Why are there so many programming languages?

COP4020 Programming Languages. Compilers and Interpreters Robert van Engelen & Chris Lacher

SOFTWARE ARCHITECTURE 6. LISP

Objects and Classes Lecture 1

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

1DL321: Kompilatorteknik I (Compiler Design 1) Introduction to Programming Language Design and to Compilation

1DL321: Kompilatorteknik I (Compiler Design 1)

Introduction P L COS 301. Fall School of Computing and Information Science University of Maine. Introduction COS 301.

Component V Supporting Materials / Learn More Interesting Facts. Interesting Facts

Programming Languages

CS 3304 Comparative Languages. Lecture 1: Introduction

Programming Language Concepts 1982, 1987, Outline. Period

9/7/17. Outline. Name, Scope and Binding. Names. Introduction. Names (continued) Names (continued) In Text: Chapter 5

Introduction to Engineering Using Robotics Experiments. Dr. Yinong Chen

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

1. In waterfall model, output of one phase is input to next phase. True or false.

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo

Evolution of the Major Programming Languages

Introduction to Java Programming

Lecture 1: Course Introduction

Course outline. CSE 341: Programming Languages. Why study programming languages? Course motivation and objectives. 1 lecture: Concepts

CS Exam #1-100 points Spring 2011

In this third unit about jobs in the Information Technology field we will speak about software development


Chapter 2. Evolution of the Major Programming Languages ISBN

Compiling and Interpreting Programming. Overview of Compilers and Interpreters

C++ Spring Break Packet 11 The Java Programming Language

Functional Programming Principles in Scala. Martin Odersky


Hi! My name is Sorin. Programming Languages. Why study PL? (discussion) Why study PL? Course Goals. CSE 130 : Fall 2013

Programming Languages

What are compilers? A Compiler

Scientific Computing

Language Evaluation P L COS 301. Fall School of Computing and Information Science University of Maine. Language Evaluation COS 301.

Scripted Components: Problem. Scripted Components. Problems with Components. Single-Language Assumption. Dr. James A. Bednar

Scripted Components Dr. James A. Bednar

Mechanization. A little bit of history. Mechanization. The old dream of mechanical computing. Jordi Cortadella Department of Computer Science

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

Concepts of Programming Languages (750321)

Lecture 1: Course Introduction

Comp 333: Concepts of Programming Languages Fall 2016

A little bit of history. Jordi Cortadella Department of Computer Science

LCC 6310 The Computer as an Expressive Medium. Lecture 1

LECTURE 1. Overview and History

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

Business and Scientific Applications of the Java Programming Language

Transcription:

Overview Introduction Motivation Why study programming languages? Some key concepts What is a programming language?

What is a programming language?...there is no agreement on what a programming language really is and what its main purpose is supposed to be. Is a programming language a tool for instructing machines? A means of communicating between programmers? A vehicle for expressing highlevel designs? A notation for algorithms? A way of expressing relationships between concepts? A tool for experimenta-tion? A means of controlling computerized devices? My view is that a general-purpose programming language must be all of those to serve its diverse set of users. The only thing a language cannot be and survive is a mere collection of neat features. -- Bjarne Stroustrup, The Design and Evolution of C++ http://cs.umbc.edu/courses/331/papers/dne_notes.pdf On language and thought (1) Idea: language effects thought A strong version of the hypothesis holds that language determines thought and that linguistic categories limit and determine cognitive categories. A weaker version states that linguistic categories and usage influence thought and certain kinds of non-linguistic behaviour. Wikipedia Still controversial for natural languages: eskimos, numbers, etc. See Does Your Language Shape How You Think? Does a choice of a programming language effect the program ideas you can express? On language and thought (2) The tools we use have a profound (and devious!) influence on our thinking habits, and therefore, on our thinking abilities. -- Edsger Dijkstra, How do we tell truths that might hurt A language that doesn't affect the way you think about programming, is not worth knowing -- Alan Perlis On languages and thought (3) What doesn't exist are really powerful general forms of arguing with computers right now. So we have to have special orders coming in on special cases and then think up ways to do it. Some of these are generalizable and eventually you will get an actual engineering discipline. -- Alan Kay, Educom Review Alan Kay is one of the inventors of the Smalltalk programming language and one of the fathers of the idea of OOP. He is the conceiver of the laptop computer and the architect of the modern windowing GUI.

Some General Underlying Issues Why study PL concepts? Programming domains PL evaluation criteria What influences PL design? Tradeoffs faced by programming languages Implementation methods Programming environments Why study Programming Language Concepts? Increased capacity to express programming concepts Improved background for choosing appropriate languages Enhanced ability to learn new languages Improved understanding of the significance of implementation Increased ability to design new languages Mastering different programming paradigms Programming Domains Scientific applications Business applications Artificial intelligence Systems programming Scripting languages Special purpose languages Language Evaluation Criteria Readability Writability Reliability Cost Etc

Evaluation Criteria: Readability How easy is it to read and understand programs written in the programming language? Arguably the most important criterion! Factors effecting readability include: Overall simplicity» Too many features is bad as is a multiplicity of features Orthogonality: a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language» Makes the language easy to learn and read» Meaning is context independent Control statements Data type and structures Syntax considerations Evaluation Criteria: Writability How easy is it to write programs in the language? Factors effecting writability: Simplicity and orthogonality Support for abstraction Expressivity Fit for the domain and problem Evaluation Criteria: Reliability Factors: - Type checking - Exception handling - Aliasing - Readability and writability Evaluation Criteria: Cost Categories: Programmer training Software creation Compilation Execution Compiler cost Poor reliability Maintenance

Evaluation Criteria: others Portability Generality Well-definedness Good fit for hardware (e.g., cell) or environment (e.g., Web) etc Language Design Influences Computer architecture - We use imperative languages, at least in part, because we use von Neumann machines John von Neuman is generally considered to be the inventor of the "stored program" machines, the class to which most of today's computers belong One CPU + one memory system that contains both program and data - Focus on moving data and program instructions between registers in CPU to memory locations - Fundamentally sequential Von Neumann Architecture Language Design Influences: Programming methodologies 50s and early 60s: Simple applications; worry about machine efficiency Late 60s: People efficiency became important; readability, better control structures. maintainability Late 70s: Data abstraction Middle 80s: Object-oriented programming 90s: distributed programs, Internet 00s: Web, user interfaces, graphics, mobile, services 10s: parallel computing, cloud computing?, pervasive computing?, semantic computing?, virtual machines?

Language Categories The big four PL paradigms: Imperative or procedural (e.g., Fortran, C) Object-oriented (e.g. Smalltalk, Java) Functional (e.g., Lisp, ML) Rule based (e.g. Prolog, Jess) Others: Scripting (e.g., Python, Perl, PHP, Ruby) Constraint (e.g., Eclipse) Concurrent (Occam) Language Design Trade-offs Reliability versus cost of execution Ada, unlike C, checks all array indices to ensure proper range Writability versus readability (2 = 0 +.= T o. T) / T <- in APL one-liner producing prime numbers from 1 to N Flexibility versus safety C, unlike Java, allows one to do arithmetic on pointers Implementation methods Direct execution by hardware e.g., native machine language Compilation to another language e.g., C compiled to native machine language for Intel Pentium 4 Interpretation: direct execution by software e.g., csh, Lisp (traditionally), Python, JavaScript Hybrid: compilation then interpretation Compilation to another language (aka bytecode), then interpreted by a virtual machine, e.g., Java, Perl Just-in-time compilation Dynamically compile some bytecode to native code (e.g., V8 javascript engine) Compilation

Interpretation Hybrid 3 Implementation issues 1. Complexity of compiler/interpreter 2. Translation speed 3. Execution speed 4. Code portability 5. Code compactness 6. Debugging ease compile hybrid 5 2 1 interpret 6 4 Programming Environments The collection of tools used in software development, often including an integrated editor, debugger, compiler, collaboration tool, etc. Modern Integrated Development Environments (IDEs) tend to be language specific, allowing them to offer support at the level at which the programmer thinks. Examples: UNIX -- Operating system with tool collection EMACS a highly programmable text editor Smalltalk -- A language processor/environment Microsoft Visual C++ -- A large, complex visual environment Your favorite Java environment: BlueJ, Jbuilder, J++, Generic: IBM s Eclipse

Summary Programming languages have many aspects & uses There are many reasons to study the concepts underlying programming languages There are several criteria for evaluating PLs Programming languages are constantly evolving Classic techniques for executing PLs are compilation and interpretation, with variations