CSE305 Programming Languages Notes are based primarily on Sebesta text. Quotes are from Sebesta text, unless otherwise noted. Sources other than Sebesta.

Slides:



Advertisements
Similar presentations
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Advertisements

Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
1 CSC 533: Organization of Programming Languages Spring 2008 See online syllabus at: Course goals:  understand issues in designing,
Chapter 1: Preliminaries
PLLab, NTHU Cs2403 Programming Languages Implementation Issues Cs2403 Programming Language Spring 2005 Kun-Yuan Hsieh.
Louden, Chapter 3 - Language Design Principles Programming Languages: Principles and Practice, 2nd Ed.
CS 330 Programming Languages 09 / 07 / 2006 Instructor: Michael Eckmann.
ISBN Chapter 5 Names, Bindings, Type Checking, and Scopes Names Variables The Concept of Binding Type Checking Strong Typing Type Compatibility.
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
CS 354 Overview. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Course Topics What is a programming language? What features do programming.
CS 330 Programming Languages 09 / 06 / 2007 Instructor: Michael Eckmann.
Programming Languages Structure
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
Lecture 2 Concepts of Programming Languages
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
CSE305 Programming Languages Notes are based primarily on Sebesta text. Quotes are from Sebesta text (7 th edition), unless otherwise noted. Sources other.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
ICE1341 Programming Languages Spring 2005 Lecture #3 Lecture #3 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Programming Language Concepts
1 Programming Languages Marjan Sirjani 2 1- The Study of Programming Languages The purpose of language is simply that it must convey meaning. (Confucius)
Language Evaluation Criteria
314450: PROGRAMMING PARADIGMS Teaching scheme: Examination Scheme: Lectures: 3 Hours/Week Theory: 100 Marks OBJECTIVE: To understand the basic building.
PROGRAMMING LANGUAGES The Study of Programming Languages.
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
CS 355 – Programming Languages
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
CS 363 Comparative Programming Languages
Types for Programs and Proofs Lecture 1. What are types? int, float, char, …, arrays types of procedures, functions, references, records, objects,...
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
Programming Languages Summer
1 CSC 533: Organization of Programming Languages Spring 2010 See online syllabus at: Course goals:  understand issues in designing,
1 Programming Languages Marjan Sirjani Course web site:
Programming Language C++ Xulong Peng CSC415 Programming Languages.
1 Programming Language History and Evolution In Text: Chapter 2.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
ICS 313 Fundamentals of Programming Languages Instructor: Abdul Wahid Wali Lecturer, CSSE, UoH
ISBN CS 354 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Course Topics What is a programming language? What features.
ISBN Chapter 1 Preliminaries. Copyright © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Programming Domains 1.Scientific Applications Typically, scientific applications have simple data structures but require large numbers of floating-point.
Chapter 3 - Language Design Principles
Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
CSCE 343 – Programming Language Concepts Welcome!.
The College of Saint Rose CIS 433 – Programming Languages David Goldschmidt, Ph.D. from Concepts of Programming Languages, 9th edition by Robert W. Sebesta,
Programming Languages 2nd edition Tucker and Noonan
Principles of Programming Languages
CSC 533: Programming Languages Spring 2016
CSC 533: Programming Languages Spring 2015
Introduction to programming languages, Algorithms & flowcharts
CSCI 3370: Principles of Programming Languages Introduction
Why study programming languages?
Introduction to programming languages, Algorithms & flowcharts
PROGRAMMING LANGUAGES
Chapter 1 Reasons to study concepts of PLs Programming Domains
1.1 Reasons to study concepts of PLs
Chapter 1 Preliminaries.
Introduction to programming languages, Algorithms & flowcharts
CS 3304 Comparative Languages Fall 2011
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Chapter 1 Preliminary. Chapter 1 Preliminary 1.1 Reasons for Studying Concepts of Programming Languages Increased capacity to express ideas Improved.
Lecture 2 Concepts of Programming Languages
Programming Languages, Preliminaries, History & Evolution
Reasons To Study Programming Languages
Lecture 2 Concepts of Programming Languages
Presentation transcript:

CSE305 Programming Languages Notes are based primarily on Sebesta text. Quotes are from Sebesta text, unless otherwise noted. Sources other than Sebesta will be clearly indicated.

Do you need to study programming languages? You already know at least two languages: Java and C++. Things never change: Java and C++ will always be the major languages. There are other languages? But nobody really uses them, do they?

Quick survey: what languages have your written programs in? Pascal Perl Prolog PHP BASIC Python SQL Scheme Lisp Modula3 Java C++ WebSphere C MIPS assembly C# Visual Basic Smalltalk

“Increased capacity to express ideas.” Languages tend to facilitate certain kinds of problem solving. Knowing more than one language equips you with different problem solving skills. –richness of primitive types, user-defined types, polymorphism, inheritance –atomic data, structured data, objects, generics The problem solving concepts can be transferred from one language to another. –using arrays to simulate records

“Improved background for choosing appropriate languages.” Languages tend to facilitate certain kinds of problem solving. Knowing what language offers good support for problem solving in a particular domain. Fortran is very good for scientific number crunching Prolog is very good for rule-based reasoning

“Increased ability to learn new languages.” Understanding the essential commonalities aids in learning new languages. For example: Structure theorem (Bohm & Jacopini, 1966) tells us that sequencing, selection and iteration are sufficient control structures. Different languages provide these in different ways: syntactic form is not what’s important – look for underlying expressiveness.

“Better understanding of the significance of implementation.” Programmers make better use of language features when they understand implementation issues. For example: understanding how recursion is implemented leads to judicious use of it. For example: understanding how “last call optimization” works allows programmers to write efficient recursive programs, in languages that support this optimization.

“Overall advancement of computing.” Deeper understanding of benefits & drawbacks of language design can help promote more sensible language choices over “more comfortable” ones.

Why do you choose to use a particular PL? Comfort: you already know it. Cost: it is free/inexpensive to acquire. Efficiency: it executes quickly. Environment: it has good development tools. Appropriateness: it is well-suited to your domain. No choice: you boss told you to. Support: the language is well-supported. Robustness: it is easy to write robust programs in it (or: it is difficult to write fragile programs in it).

Things to think about Readability Writability Reliability Cost

Readability are programs written in a language easy to understand a product not only of programmer discipline but also of language facilities (e.g. variable names in early BASIC could be one letter or one letter and one digit).

Are there too many ways to express the same idea? –x = x + 1; x += 1; x++; ++x; Are there many arbitrary restrictions on what you can do? (IBM vs VAX) –A Reg1, memory_cell –AR Reg1, Reg2 –ADDL op_1, op_2 Context-dependence: a + b in C –meaning is different if a and b are pointers than if they are not.

Writability How easy is it to model a problem domain in a language? What sorts of abstraction mechanisms does the language support?

Reliability Type checking –static vs. dynamic –strong vs. weak Exception handling –generally considered very useful to deal with unexpected or out-of-the-ordinary runtime events

Cost Acquisition cost Training cost Cost of writing programs in language Compilation cost Execution cost Cost of poor reliability (think of liability for safety- critical applications) Cost of maintenance Cost of portability