CSE305 Programming Languages Notes are based primarily on Sebesta text. Quotes are from Sebesta text (7 th edition), unless otherwise noted. Sources other.

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
CS 330 Programming Languages 09 / 07 / 2006 Instructor: Michael Eckmann.
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
CSE305 Programming Languages Notes are based primarily on Sebesta text. Quotes are from Sebesta text, unless otherwise noted. Sources other than Sebesta.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
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)
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
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 – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
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
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
Programming Languages Summer
February 25, ICE 1341 – Programming Languages (Lecture #1) In-Young Ko Programming Languages (ICE 1341) Lecture #1 Programming Languages (ICE 1341)
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:
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.
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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
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!.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Programming Languages 2nd edition Tucker and Noonan
Principles of Programming Languages
CSC 533: Programming Languages Spring 2016
CSC 533: Programming Languages Spring 2015
Concepts of Programming Languages
Introduction to programming languages, Algorithms & flowcharts
Concepts of Programming Languages
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.
Programming Concepts and Languages
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
Chapter 1 Preliminaries.
School of Computer & Information Engineering,
Programming Languages, Preliminaries, History & Evolution
Reasons To Study Programming Languages
Presentation transcript:

CSE305 Programming Languages Notes are based primarily on Sebesta text. Quotes are from Sebesta text (7 th edition), 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 (aside from Java and C++)? assembly (mips, arm, x86) ruby C# perl php vb python basic from when I was young cold fusion hypertalk smalltalk fortran cobol rpg a lot of archaic obsolete languages forth ada

Fall 2006 the results were: C C# SQL Logo Python shell scripting languages (sh, ksh) Pascal Ruby Assembly (MIPS, ARM) Visual Basic Perl ML Prolog Scheme Erlang PHP Flash

“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? This is 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) –IBM: two instructions (varies based on type of 2 nd arg) A Reg1, memory_cell AR Reg1, Reg2 –VAX: one more flexible instruction ADDL op_1, op_2 Context-dependence: a + 3 in (the language) C –meaning is different if a is a pointer than if is not.

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

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