IA010: Principles of Programming Languages

Similar documents
Concepts of Programming Languages

Concepts in Programming Languages

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

Programming Languages 2nd edition Tucker and Noonan"

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

Programming Languages, Summary CSC419; Odelia Schwartz

Introduction. COMP 524: Programming Language Concepts Björn B. Brandenburg. The University of North Carolina at Chapel Hill

CSCI 3136 Principles of Programming Languages

CS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013

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

What is a programming language?

CSc 372 Comparative Programming Languages

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

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing

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

Lecture 1: Introduction. 23. August, 2010

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

COSE212: Programming Languages. Lecture 0 Course Overview

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

Chapter 1. Preliminaries

What is programming? Elements of Programming Languages. From machine code to programming languages. What is a programming language?

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

CS A331 Programming Language Concepts

Functional Programming

Chapter 5. Names, Bindings, and Scopes

Concepts of Programming Languages

Programming Paradigms

G COURSE PLAN ASSISTANT PROFESSOR Regulation: R13 FACULTY DETAILS: Department::

Programming language design and analysis


New Programming Paradigms

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


Introduction. A. Bellaachia Page: 1

Comp 333: Concepts of Programming Languages Fall 2016

Com S 541. Programming Languages I

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

Concepts of program design Exam January 31, 13:30 16:30

Objects and Classes Lecture 1

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

CS 314 Principles of Programming Languages

Topic 1: Introduction

Chapter 5 Names, Binding, Type Checking and Scopes

Introduction, Functions

CSc 520. Course Outline (Subject to change) Course Outline (Subject to change)... Principles of Programming Languages. Christian Collberg

INTRODUCTION PRINCIPLES OF PROGRAMMING LANGUAGES. Norbert Zeh Winter Dalhousie University 1/10

Chapter 1. Preliminaries

Functional Programming Principles in Scala. Martin Odersky

CS558 Programming Languages

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

LECTURE 1. Overview and History

Type Inference. Prof. Clarkson Fall Today s music: Cool, Calm, and Collected by The Rolling Stones

Level 3 Computing Year 2 Lecturer: Phil Smith

ITT8060 Advanced Programming

Principles of Programming Languages. Lecture Outline

Seminar in Programming Languages

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

Programmiersprachen (Programming Languages)

Introduction. Primitive Data Types: Integer. Primitive Data Types. ICOM 4036 Programming Languages

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

CPSC 427: Object-Oriented Programming

Chapter 5 Names, Bindings, Type Checking, and Scopes

Lecture 4 Memory Management

INSTITUTE OF AERONAUTICAL ENGINEERING

IA010: Principles of Programming Languages

NOTE: Answer ANY FOUR of the following 6 sections:

CS 314 Principles of Programming Languages

Principles of Programming Languages Lecture 22

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008.

The University of Aizu School of Computer Science and Engineering Introduction to Programming. Course Syllabus (Special Track for Foreign Students)

CS 3304 Comparative Languages. Lecture 1: Introduction

Topic 9: Type Checking

Topic 9: Type Checking

G Programming Languages - Fall 2012

Anders Møller Michael Schwartzbach Erik Ernst Hans Hüttel

CS558 Programming Languages

CSCI 565 Compiler Design and Implementation Spring 2014

Introduction (1) COMP 520: Compiler Design (4 credits) Alexander Krolik MWF 13:30-14:30, MD 279

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

CIS24 Project #3. Student Name: Chun Chung Cheung Course Section: SA Date: 4/28/2003 Professor: Kopec. Subject: Functional Programming Language (ML)

Chapter 7:: Data Types. Mid-Term Test. Mid-Term Test (cont.) Administrative Notes

EI326 ENGINEERING PRACTICE & TECHNICAL INNOVATION (III-G) Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

CSCI-GA Scripting Languages

Introduction to the course and basic programming concepts

Chapter 9. Subprograms

Course Syllabus. Programming Language Paradigms. Spring - DIS Copenhagen. Semester & Location: Elective Course - 3 credits.

Closures. Mooly Sagiv. Michael Clarkson, Cornell CS 3110 Data Structures and Functional Programming

Functional Programming

Stop coding Pascal. Saturday, April 6, 13

CMSC 330: Organization of Programming Languages

CPSC 427a: Object-Oriented Programming

UNIT I Programming Language Syntax and semantics. Kainjan Sanghavi

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

Compiler Design Spring 2018

G Programming Languages - Fall 2018

CS 3360 Design and Implementation of Programming Languages. Exam 1

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

Chapter 10 Implementing Subprograms

CS 242. Fundamentals. Reading: See last slide

Transcription:

IA010: Principles of Programming Languages Introduction and course organization Achim Blumensath blumens@fi.muni.cz Faculty of Informatics, Masaryk University, Brno

Warm-up: A Quiz What does this program do? ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Warm-up: A Quiz What does this program do? ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. Prints Hello World!

Warm-up: A Quiz What does this program do? ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. Prints Hello World! Brainfuck (1993) Turing-complete programming language tape containing numbers (inc/dec), a data pointer (l/r), input/output, conditional jump compiler of size 100 bytes known to exist (more info: http://en.wikipedia.org/wiki/brainfuck)

Before high-level programming languages...

Now... C C++ Java C# Ada Python PHP JavaScript VisualBasic Perl Haskell OCaml F# Scheme... Scala Rust Go Swift

Now... C C++ Java C# Ada Python PHP JavaScript VisualBasic Perl Haskell OCaml F# Scheme... Scala Rust Go Swift A zoo of programming languages

Now... C C++ Java C# Ada Python PHP JavaScript VisualBasic Perl Haskell OCaml F# Scheme... Scala Rust Go Swift A zoo of programming languages Can we somehow categorise them? How do we choose one?

Profanity is the one language all programmers know best. Anon.

PL popularity TIOBE index, January 2017, www.tiobe.com

PL popularity

Desirable language features

Desirable language features simplicity orthogonality clear (and defined) semantics ease of use easy to learn clean and readable syntax expressive power support for many paradigms and coding styles strong safety guarantees produces fast code compilation speed reduced memory usage good library and tool chain support standardisation and documentation interoperability with other languages hardware and system independence support for hardware and system programming...

Coding style choices

Coding style choices readability: the code is easy to understand reliability: the program does what it is supposed to maintainability: it is easy to fix bugs and add new features efficiency: the program runs fast

Programming paradigms

Programming paradigms procedural: program is structured as a collection of procedures/functions imperative: list of commands functional: expressions that compute a value declarative: describe what you want to compute, not how object-oriented: objects communicating via messages data-oriented: layout of your data in memory reactive: network of components that react to events

Programming paradigms procedural: program is structured as a collection of procedures/functions imperative: list of commands functional: expressions that compute a value declarative: describe what you want to compute, not how object-oriented: objects communicating via messages data-oriented: layout of your data in memory reactive: network of components that react to events Which one to use?

Programming paradigms procedural: program is structured as a collection of procedures/functions imperative: list of commands functional: expressions that compute a value declarative: describe what you want to compute, not how object-oriented: objects communicating via messages data-oriented: layout of your data in memory reactive: network of components that react to events Which one to use? Choose the right tools for the job!

Programming paradigms procedural: program is structured as a collection of procedures/functions imperative: list of commands functional: expressions that compute a value declarative: describe what you want to compute, not how object-oriented: objects communicating via messages data-oriented: layout of your data in memory reactive: network of components that react to events Which one to use? Choose the right tools for the job! Multi-paradigm languages The more paradigms your language support, the more tools you have in your toolbox.

Why study programming languages and paradigms? The study of language features and programming styles helps you to choose a language most appropriate for a given task; think about problems in new ways; learn new ways to express your ideas and structure your code ( more tools in your toolbox); read other peoples code; learn new languages faster (you only need to learn a new syntax); understand the design/implementation decisions and limitations of a given language, so you can use it better: You can choose between alternative ways of expressing things. You understand more obscure features. You can simulate features not available in this particular language.

Aspects of programming languages Syntax the structure of programs. Describes how the various constructs (statements, expressions,...) can be combined into well-formed programs. Semantics the meaning of programs. Tells us what behaviour we can expect from a program. Pragmatics the use of programming languages. In which way is the language intended to be used in practice? What are the various language constructions good for?

Aspects of programming languages Syntax the structure of programs. Describes how the various constructs (statements, expressions,...) can be combined into well-formed programs. PA008 Compiler Construction, IB005/IA006 Formal Languages Semantics the meaning of programs. Tells us what behaviour we can expect from a program. IA011 Programming Language Semantics Pragmatics the use of programming languages. In which way is the language intended to be used in practice? What are the various language constructions good for? This course!

Course organisation Lectures Thursday, 10:00, A318 language: English video recordings will be available on IS some slides and lecture notes (in progress) will also be made available Examination final written exam in English k and z completion possible

Prerequisites no formal requirements knowledge of at least one of C/C++/JAVA knowledge of at least one functional language (HASKELL, ML) knowledge of object-oriented programming (OOP) the more languages you know the better

Study materials Course information, additional resources https://is.muni.cz/auth/el/1433/jaro2016/ia010/ index.qwarp Rosetta code rosettacode.org Books P. V. Roy, S. Haridi, Concepts, Techniques, and Models of Computer Programming, 1st ed., MIT Press, 2004. R. W. Sebesta, Concepts of Programming Languages, 10th ed., Addison-Wesley, 2012. Programming language pragmatics, (Ed. M. L. Scott) 3rd ed. Oxford, Elsevier Science, 2009.

Topics covered brief history of programming languages names, bindings, scope types, type checking, type inference data abstraction: abstract data types control flow subprograms (functions, methods,...) exceptions object-oriented programming concurrency functional programming