Announcements FORTRAN ALGOL COBOL. Simula & Smalltalk. Programming Languages



Similar documents
Lecture 1: Introduction

Languages september 12, 2015 Éric Lévénez < FORTRAN III end-1958 FORTRAN II FORTRAN I october 1956

CSE 307: Principles of Programming Languages

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

CSCI 3136 Principles of Programming Languages

Programming Languages

How To Understand Programming Languages And Programming Languages

What is a programming language?

CSE 130 Programming Language Principles & Paradigms

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

Principles of Programming Languages Topic: Introduction Professor Louis Steinberg

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

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

Functional Programming

CSC Software II: Principles of Programming Languages

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

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

Evolution of the Major Programming Languages

1/20/2016 INTRODUCTION

COS 301 Programming Languages

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

Fundamentals of Programming Languages

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

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

Computer Science. 232 Computer Science. Degrees and Certificates Awarded. A.S. Degree Requirements. Program Student Outcomes. Department Offices

Chapter 13: Program Development and Programming Languages

Introduction to Python

2! Multimedia Programming with! Python and SDL

Programming Languages

History of Programming Languages

Chapter 12 Programming Concepts and Languages

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

Chapter 5 Names, Bindings, Type Checking, and Scopes

Computer Science. Computer Science 207. Degrees and Certificates Awarded. A.S. Computer Science Degree Requirements. Program Student Outcomes

Chapter 13: Program Development and Programming Languages

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

Chapter 6: Programming Languages

History OOP languages Year Language 1967 Simula Smalltalk

White Paper: 5GL RAD Development

Semester Review. CSC 301, Fall 2015

Concepts of Programming Languages: A Unified Approach. Karl Abrahamson

Compilers. Introduction to Compilers. Lecture 1. Spring term. Mick O Donnell: michael.odonnell@uam.es Alfonso Ortega: alfonso.ortega@uam.

Image credits:

Scripting: Higher- Level Programming for the 21st Century

1.1 WHAT IS A PROGRAMMING LANGUAGE?

Software: Systems and. Application Software. Software and Hardware. Types of Software. Software can represent 75% or more of the total cost of an IS.

Computer Science. Computer Science 213. Faculty and Offices. Degrees and Certificates Awarded. AS Computer Science Degree Requirements

PCCC PCCC Course Description

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code

Understanding Programming Languages

DIABLO VALLEY COLLEGE CATALOG

Programming language concepts

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

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

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

Chapter 15 Functional Programming Languages

Evolution of the Major Programming Languages

Ch. 10 Software Development. (Computer Programming)

Glossary of Object Oriented Terms

Software: Systems and Application Software

2. Advance Certificate Course in Information Technology

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

INHERITANCE, SUBTYPING, PROTOTYPES in Object-Oriented Languages. Orlin Grigorov McMaster University CAS 706, Fall 2006

CS 106 Introduction to Computer Science I

Programming Language Pragmatics

Course MS10975A Introduction to Programming. Length: 5 Days

Popularity, Interoperability, and Impact of Programming Languages in 100,000 Open Source Projects

Objectives. Python Programming: An Introduction to Computer Science. Lab 01. What we ll learn in this class

How To Teach Object Oriented Programming At An Introductory Level Course

Organization of Programming Languages CS320/520N. Lecture 05. Razvan C. Bunescu School of Electrical Engineering and Computer Science

Chapter 14. Programming and Languages. McGraw-Hill/Irwin. Copyright 2008 by The McGraw-Hill Companies, Inc. All rights reserved.

Programming Language Rankings. Lecture 15: Type Inference, polymorphism & Type Classes. Top Combined. Tiobe Index. CSC 131! Fall, 2014!

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

Welcome to Introduction to Computers and Programming Course using Python

Web Development Frameworks

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

Master of Sciences in Informatics Engineering Programming Paradigms 2005/2006. Final Examination. January 24 th, 2006

A Python Tour: Just a Brief Introduction CS 303e: Elements of Computers and Programming

Department of Computer Science

Computer Information Systems (CIS)

WHITE PAPER. Peter Drucker. intentsoft.com 2014, Intentional Software Corporation

Computational Mathematics with Python

Functional Programming. Functional Programming Languages. Chapter 14. Introduction

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Computational Mathematics with Python

AUTOMATIC EVALUATION OF COMPUTER PROGRAMS USING MOODLE S VIRTUAL PROGRAMMING LAB (VPL) PLUG- IN

Department of Computer Science

Computational Mathematics with Python

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

The Evolution of Programming Languages

ABET General Outcomes. Student Learning Outcomes for BS in Computing

Transcription:

Announcements Programming Languages! Monday evening GBA section has been shut down " If you were assigned to this section, please find a different section " If you cannot attend a different section, please contact one of the TAs Week 6 CS 212 Spring 2008! Monday March 3 (next week) there will be a combination help-with-project/pizza session in place of the 12:20 sections " Keep an eye on the website for further information FORTRAN ALGOL! Initial version developed in 1957 by IBM! Example code C SUM OF SQUARES ISUM = 0 DO 100 I=1,10 ISUM = ISUM + I*I 100 CONTINUE! FORTRAN introduced many of the ideas typical of languages " Assignment " Loops " Conditionals " Subroutines! ALGOL = ALGOrithmic Language! Developed by an international committee! First version in 1958 (not widely used)! Second version in 1960 (widely used)! Sample code comment Sum of squares begin integer i, sum; for i:=1 until 10 do sum := sum + i*i; end! ALGOL 60 included recursion " Pro: Makes it easy to design clear, succinct algorithms " Con: Too hard to implement; too inefficient COBOL Simula & Smalltalk! COBOL = COmmon Business Oriented Language! Developed by the US government (about 1960) " Design was greatly influenced by Grace Hopper! Goal: Programs should look like English " Idea was that anyone should be able to read and understand a COBOL program! COBOL included the idea of records (a single data structure with multiple fields, each field holding a value)! These languages introduced and popularized Object Oriented Programming (OOP) " Simula was developed in Norway as a language for simulation (late 60s) " Smalltalk was developed at Xerox PARC in the 70s! These languages included " Classes " Objects " Subclasses & Inheritance

! Developed by Sun Microsystems; first released in 1995! Java includes " Assignment statements, loops, conditionals from FORTRAN (but Java uses syntax from C) " Recursion from ALGOL " Fields from COBOL " OOP from Simula & Smalltalk Java Programming Languages at Cornell! Some of the languages used in Cornell s CS Dept " Java # 100, 211, 212 # Many of the upper level courses " C, C++, C# # Many of the upper level courses (networks, distributed computing) " Matlab # 100M, numerical analysis courses " ML # Functional # 312, logic-related courses " SQL # Query language for databases # 432, database-related courses! Fortran, C, C++, Matlab are used widely in Engineering! SAS (originally, Statistical Analysis System) is used in various courses around campus Some Other Programming Languages! (from a Yahoo list) ABC, ActiveX, Ada, AMOS, APL, AppleScript, Assembly, awk, BASIC, BETA, C and C++, C#, Cecil, Cilk, CLU, COBOL, ColdC, ct, Curl, Delphi, Dylan, Dynace, Eiffel, Forth, Fortran, Guile, Haskell, Icon, IDL, Infer, Intercal, J, Java, JavaScript, JCL, JOVIAL, Limbo, Lisp, Logo, M - MUMPS, Magma, ML, Modula- 2, Modula-3, Oberon, Obliq, Occam, OpenGL, Pascal, Perl, PL/I, Pop, PostScript, Prograph, Prolog, Python, Rexx, Ruby, SAS, Sather, Scheme, ScriptEase, SDL, Self, SETL, Smalltalk, SQL, Tcl/Tk, TOM, Verilog, VHDL, VRML, Visual, Visual Basic, Z Some Other Programming Languages! (from a Yahoo list) ABC, ActiveX, Ada, AMOS, APL, AppleScript, Assembly, awk, BASIC, BETA, C and C++, C#, Cecil, Cilk, CLU, COBOL, ColdC, ct, Curl, Delphi, Dylan, Dynace, Eiffel, Forth, Fortran, Guile, Haskell, Icon, IDL, Infer, Intercal, J, Java, JavaScript, JCL, JOVIAL, Limbo, Lisp, Logo, M - MUMPS, Magma, ML, Modula- 2, Modula-3, Oberon,Obliq,Occam, OpenGL,Pascal, Perl, PL/I, Pop, PostScript, Prograph,Prolog, Python, Rexx, Ruby, SAS, Sather, Scheme, ScriptEase, SDL, Self, SETL, Smalltalk, SQL, Tcl/Tk, TOM, Verilog, VHDL, VRML, Visual, Visual Basic, Z Portion of a Computer Languages History from http://www.levenez.com/lang/ So Many Languages! Formula Translation (FORTRAN) in 1954 led to " Over 2000 computer languages! How many languages in use today? " Difficult to say " Legacy software (using outdated languages) is everywhere! Why can t we just use one language?

Evolution of Programming Languages Evolution of Programming Languages, Cont d! 1940s, early 1950s " Machine Language # Computation can be mechanized! 1950s " Assembly language # Programs should be human-readable Here is a language so far ahead of its time, that it was not only an improvement on its predecessors, but also on nearly all its successors. - C. A. R. Hoare commenting on Algol 60! Late 1950s " High level languages " Fortran # Compiled code can be efficient code " Cobol # Idea of structures/fields " Lisp # List as the central data structure # Programs as lists " Algol 60 # Popularized recursion # Formal specification of language syntax # Lexical scoping rules! 1960s " APL # Array # Functional style " PL/1 # IBM attempt to combine best of Fortran & Cobol " Simula # Designed for doing discrete event simulation # Introduced objectoriented concepts! 1970s " C # Designed specifically for systems " Smalltalk # First pure objectoriented " Prolog # First logic language " ML # Functional Evolution of Programming Languages, Cont d Classifying Programming Languages! 1980s " C++ # Combined C with object oriented " Ada # Designed for systems # Developed to use in place of 100s of languages used by US DoD " Perl # Developed (late 1980s) for text manipulation # Popularized in 1990s for web-site " Focus on use of modules for large scale software development! 1990s " Programming for the internet " Java # Secure execution of remote code! 2000s " Security & reliability " Programming for multiple processors! How its implemented " Compiled " Interpreted! Programming paradigm " Procedural " Object-oriented " Functional " Logic "! Intended domain of use " General purpose " Systems " Scripting " Concurrent/distributed processes " Educational " Various other domains Compiled vs. Interpreted Some Programming Paradigms! Compiled " Parse code (typically create an abstract syntax tree) " Create machine code for entire program! Interpreted " Run each statement as the statement is parsed! Examples " Typically compiled: Fortran, Java, C " Interpreted: Matlab, Python, Logo, some versions of Basic! Advantages/Disadvantages?! The boundary between compiled and interpreted can be fuzzy " Java is compiled to produce JBC (Java Byte Code) " The JBC is then interpreted or JIT compiled! Procedural " Program can be broken into procedures (or subroutines or functions) " Examples: Fortran, Algol, Cobol, C, PL/1, Pascal! Object-oriented " Program is seen as a group of cooperating objects # Ideas: encapsulation, inheritance, polymorphism " Examples: Smalltalk, Java, C++, C#, Python, recent Fortran, recent Cobol! Functional " Emphasizes application of functions " Avoids state; avoids mutable data " Examples: Lisp, Clean, ML, Haskell, Scheme! Logic " Based on use of declarative statements in the language of mathematical logic " Example: Prolog, Oz

Imperative vs. Declarative! Imperative " Statements tell the computer what to do " Think commands or recipe " Examples # Java, C, Fortran Prolog Example sendmore(digits) :- Digits = [S,E,N,D,M,O,R,Y], % Create variables Digits :: [0..9], % Associate domains to variables S #\= 0, % Constraint: S must be different from 0 M #\= 0, alldifferent(digits), % All elements must take different values! Declarative " Describe what something is like rather than telling how to create it " Examples # Functional (Haskell) # Logic (Prolog) 1000*S + 100*E + 10*N + D % Other problem constraints + 1000*M + 100*O + 10*R + E #= 10000*M + 1000*O + 100*N + 10*E + Y, labeling(digits). % Start the search (from Wikipedia) Languages for Different Domains Scripting Languages! General purpose " Examples: Lisp, Algol, PL/1, Scheme, Java, Python! Systems " Emphasis on efficiency and tight control of data structures " Examples: C, C++, Forth, Modula-2! Scripting " Examples: Unix shell, Perl, Python, Ruby, Tcl! Concurrent/distributed processes " Control of multiple threads " Examples: Ada, Oz, Smalltalk, Java! Educational " Examples: Basic, Haskell, Pascal, Python, Scheme, Smalltalk,! Various other domains " Discrete event simulation: Simula " Web scripting: Javascript " Realtime applications: Ada " Text processing: Snobol " Printing: Postscript "! A script is a sequence of common commands made into a single program " Unix uses shell scripts " The shell is the interactive interface to Unix " You can combine commands from the Unix shell to create programs! A scripting language is usually " Easy to learn " Interpreted instead of compiled! Example scripting languages: Unix shell, Python, Perl, Tcl (Tool command language)! Some Python code: class Stack (object): def init (self): self.stack = [ ] def put (self, item): self.stack.append(item) def get (self): return self.stack.pop() def isempty (self): return len(self.stack) == 0 A Programming Language Controversy Just for Fun: An APL Example! Go To Statement Considered Harmful " Edsger Dijkstra, Communications of the ACM (March 1968)! Sparked long-running discussion on whether go to is necessary or desirable " Proponents of go to presented examples where code was more readable using go to " At the time # No break # No continue # No exceptions! Led to concept of structured " Idea: Code is clearer if we restrict ourselves to just a few control structures " Loops have single entry, single exit! This is the entire program for a generational update in Conway s Game of Life " Live cell & less than 2 live neighbors dies of loneliness " Live cell & more than 3 neighbors dies of overcrowding " Live cell & 2 or 3 neighbors contentment " Empty cell & exactly 3 neighbors birth

Programming Language Weirdness! Weird languages " Whitespace # Only spaces, tabs, and newlines are significant # A great language for security since a program can be printed onto plain paper and stored without worrying about an adversary reading the code " var'aq # Based on the grammatical structure of the Klingon language! Weird concepts " Polyglot code # Code that is valid for multiple languages # Usually takes advantage of the different ways that comments are indicated in the different languages " Quine # A program whose only output is its own source code # Not considered valid to use the empty program Some Advice! Use the language that best fits your task! Think small " Write little programs that test various concepts " Test them! " Comment them! " Build collections of these little programs " Reuse your own code