What is a programming language?

Similar documents
Chapter 1. Dr. Chris Irwin Davis Phone: (972) Office: ECSS CS-4337 Organization of Programming Languages

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

CSE 130 Programming Language Principles & Paradigms

1/20/2016 INTRODUCTION

Evolution of the Major Programming Languages

COS 301 Programming Languages

Image credits:

Programming Languages

CSC Software II: Principles of Programming Languages

Lecture 1: Introduction

Chapter 13 Computer Programs and Programming Languages. Discovering Computers Your Interactive Guide to the Digital World

CSCI 3136 Principles of Programming Languages

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Chapter 13: Program Development and Programming Languages

Announcements FORTRAN ALGOL COBOL. Simula & Smalltalk. Programming Languages

CSE 307: Principles of Programming Languages

Principles of Programming Languages Topic: Introduction Professor Louis Steinberg

n Introduction n Art of programming language design n Programming language spectrum n Why study programming languages? n Overview of compilation

CS 51 Intro to CS. Art Lee. September 2, 2014

Asogwa Tochukwu Chijindu Department of Computer Engineering, Enugu State University of Science and Technology(ESUT), Enugu, Nigeria.

1. Overview of the Java Language

Computer Programming. Course Details An Introduction to Computational Tools. Prof. Mauro Gaspari:

THE ROLE OF PROGRAMMING PARADIGMS IN THE FIRST PROGRAMMING COURSES. 1. Introduction

Fall 2012 Q530. Programming for Cognitive Science

Programming Languages & Tools

System Structures. Services Interface Structure

Structure of Presentation. The Role of Programming in Informatics Curricula. Concepts of Informatics 2. Concepts of Informatics 1

McGraw-Hill The McGraw-Hill Companies, Inc.,

CS 40 Computing for the Web

HPC Wales Skills Academy Course Catalogue 2015

COMPARISON OF OBJECT-ORIENTED AND PROCEDURE-BASED COMPUTER LANGUAGES: CASE STUDY OF C++ PROGRAMMING

USE OF PYTHON AS A SATELLITE OPERATIONS AND TESTING AUTOMATION LANGUAGE

White Paper: 5GL RAD Development

Chapter 13: Program Development and Programming Languages

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Levels of Programming Languages. Gerald Penn CSC 324

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Programming Languages

COS 333: Advanced Programming Techniques

Course Goal CMSC 330: Organization of Programming Languages. Studying Programming Languages. All Languages Are (Kind of) Equivalent.

Chapter 12 Programming Concepts and Languages

How To Teach Object Oriented Programming At An Introductory Level Course

General Introduction

CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014

Instructor Özgür ZEYDAN BEU Dept. of Enve. Eng. CIV 112 Computer Programming Lecture Notes (1)

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Fundamentals of Programming Languages

CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

Introduction to programming

Chapter 3.2 C++, Java, and Scripting Languages. The major programming languages used in game development.

Lesson 06: Basics of Software Development (W02D2

How To Understand Programming Languages And Programming Languages

CS 209 Programming in Java #1

Python Programming: An Introduction to Computer Science

OCR LEVEL 2 CAMBRIDGE TECHNICAL

A Modular Approach to Teaching Mobile APPS Development

1.1 WHAT IS A PROGRAMMING LANGUAGE?

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

The Application of Visual Basic Computer Programming Language to Simulate Numerical Iterations

Introduction to Software Paradigms & Procedural Programming Paradigm

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz

High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser)

Chapter 5 Names, Bindings, Type Checking, and Scopes

Jonathan Worthington Scarborough Linux User Group

Efficiency Considerations of PERL and Python in Distributed Processing

Teaching Adaptability of Object-oriented Programming Language Curriculum

Programming Languages

Department of Computer Science

Web Development Frameworks

DEGREE PLAN INSTRUCTIONS FOR COMPUTER ENGINEERING

Masters in Artificial Intelligence

CS Standards Crosswalk: CSTA K-12 Computer Science Standards and Oracle Java Programming (2014)

Masters in Human Computer Interaction

M.Tech. Software Systems

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

Datavetenskapligt Program (kandidat) Computer Science Programme (master)

Functions of NOS Overview of NOS Characteristics Differences Between PC and a NOS Multiuser, Multitasking, and Multiprocessor Systems NOS Server

Computer Science. Requirements for the Major (updated 11/13/03)

Programming Language Concepts for Software Developers

Programming language concepts

History of Programming Languages

Aspect-Oriented Programming

Masters in Human Computer Interaction

Masters in Advanced Computer Science

Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation.

Semester Review. CSC 301, Fall 2015

Computer Science Course Descriptions Page 1

School of Computer Science

Chapter 6: Programming Languages

The value of modeling

CS 253: Intro to Systems Programming

Transcription:

Overview Introduction Motivation Why study programming languages? Some key concepts What is a programming language? Artificial language" Computers" Programs" Syntax" Semantics"

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