Comparative Programming Languages

Similar documents
CSc 372 Comparative Programming Languages

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

Concepts in Programming Languages

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

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

CS 6371: Advanced Programming Languages

Introduction to Computer Science I

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

CS 241 Data Organization using C

CS 3304 Comparative Languages. Lecture 1: Introduction

TTh 9.25 AM AM Strain 322

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

CS240: Programming in C

Advanced Programming Concepts. CIS 15 : Spring 2007

Introduction to Data Structures

Programming (Econometrics)

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

Programming (ERIM) Lecture 1: Introduction to programming paradigms and typing systems. Tommi Tervonen

ECE Object-Oriented Programming using C++ and Java

COMP 117: Internet-scale Distributed Systems Lessons from the World Wide Web

COSC 115A: Introduction to Web Authoring Fall 2014

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering?

COMP 201: Principles of Programming

CSC 172 Data Structures and Algorithms. Fall 2017 TuTh 3:25 pm 4:40 pm Aug 30- Dec 22 Hoyt Auditorium

15-411/ Compiler Design

Welcome to Introduction to Computer Science I

IA010: Principles of Programming Languages

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

COSC 115: Introduction to Web Authoring Fall 2013


CS/SE 153 Concepts of Compiler Design

CSC 261/461 Database Systems. Fall 2017 MW 12:30 pm 1:45 pm CSB 601

LIS 2680: Database Design and Applications

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

CIS 101 Orientation Document Fall 2017

CSC 443: Web Programming

Programming Languages 2nd edition Tucker and Noonan"

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

San José State University College of Science/Department of Computer Science CS 152, Programming Language Paradigms, Section 03/04, Fall, 2018

San José State University Computer Science CS 122 Advanced Python Programming Spring 2018

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

CS558 Programming Languages

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

CS 113: Introduction to

Welcome to CS 135 (Winter 2018)

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

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

CSCI 3136 Principles of Programming Languages

CS 241 Data Organization. August 21, 2018

Lecture 1: Course Introduction

Concepts of Programming Languages

Introduction to Prof. Clarkson Fall Today s music: Prelude from Final Fantasy VII by Nobuo Uematsu (remastered by Sean Schafianski)

Overview of the Class

INFS 2150 (Section A) Fall 2018

San José State University Department of Computer Science CS-174, Server-side Web Programming, Section 2, Spring 2018

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo

CSCI 201L Syllabus Principles of Software Development Spring 2018

LECTURE 1. Overview and History

Course and Contact Information. Course Description. Course Objectives

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

CS 3110 Lecture 1 Course Overview

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

Introduction to Nate Foster Spring 2018

Announcements. 1. Forms to return today after class:

CPSC 213. Introduction to Computer Systems. Introduction. Unit 0

CIS 3308 Web Application Programming Syllabus

Introduction. A. Bellaachia Page: 1

Credit: The lecture slides are created based on previous lecture slides by Dan Zingaro.

THE UNIVERSITY OF ARIZONA

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336

Welcome to. Instructor Marc Pomplun CS 470/670. Introduction to Artificial Intelligence 1/26/2016. Spring Selectivity in Complex Scenes

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

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

CS120 Computer Science I. Instructor: Jia Song

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

CSC116: Introduction to Computing - Java

CS/SE 153 Concepts of Compiler Design

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

Object-Oriented Programming for Managers

Web Programming Fall 2011

CS2303 C14 Systems Programming Concepts. Bob Kinicki

Database Concepts. CS 377: Database Systems

Principles of Programming Languages. Lecture Outline

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

Writeup for first project of CMSC 420: Data Structures Section 0102, Summer Theme: Threaded AVL Trees

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

CSC209H Lecture 1. Dan Zingaro. January 7, 2015

Welcome to CS 115 (Winter 2018)

Spring 2018 El Camino College E. Ambrosio. Course Syllabus

This handbook contains directions on using tools and resources in WebAccess at CSM.

CS 50 Introduction to Computer Science I

CS 4349 Lecture August 21st, 2017

CSC 111 Introduction to Computer Science (Section C)

Boot Camp. Dave Eckhardt Bruce Maggs

CSE 333 Lecture 1 - Systems programming

CSCI 528: OBJECT ORIENTED PROGRAMMING, Fall 2015

Lecture 1: Course Introduction

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

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

Computer Science Seminar. Whats the next big thing? Ruby? Python? Neither?

Transcription:

Comparative Programming Languages CSC 372 Spring 2018 cs.arizona.edu/classes/cs372/spring18 Stranger Danger Introduce yourself to your tablemates while we're waiting to launch! CSC 372, Spring 2018, Introduction slide 1

William Mitchell (whm) Instructor Consultant/contractor doing software development and training of software developers. Lots with Java, C++, C, Python, Ruby, Icon, and more. Linux stuff, too. Occasionally teach a CS course. (337, 352, 372, and others) Adjunct instructor, not a professor Education: BS CS (North Carolina State University, 1981) MS CS (University of Arizona, 1984) Incorrect to say "Dr. Mitchell" or "Professor Mitchell"! CSC 372, Spring 2018, Introduction slide 2

Functional programming with Haskell Topic Sequence Imperative and object-oriented programming using dynamic typing with Ruby Logic programming with Prolog Whatever else in the realm of programming languages that we find interesting and have time for. Note: We'll cover a selection of elements from the languages, not everything. CSC 372, Spring 2018, Introduction slide 3

Themes running through the course Discerning the philosophy of a language and how it's manifested Understanding tensions and tradeoffs in language design Acquiring a critical eye for language design Assessing the "mental footprint" of a language Learning how to learn a language (LHtLaL) CSC 372, Spring 2018, Introduction slide 4

Syllabus highlights (cs.arizona.edu/classes/cs372/spring18/syllabus.html) CSC 372, Spring 2018, Introduction slide 5

Prerequisites CSC 120 or 127B or 227 But, this is a 300-level class! Prereqs, Piazza, Mail Piazza Our forum Sign up if you haven't already! Private posts disabled use mail If staff starts a thread, the first post is required reading Mail goes to whm and TAs For anything more than "Thanks!" use "Reply All" to follow the Cc:'s CSC 372, Spring 2018, Introduction slide 6

Teaching Assistants Undergraduate TAs Alex Koltz (akoltz) Michael Ordaz (michaelaordaz) Office hours and contact information is on website CSC 372, Spring 2018, Introduction slide 7

Textbooks No texts are required. Lectures, handouts, and Piazza postings might be all you need. Syllabus and slides have recommendations for supplementary texts, most of which are on Safari Books Online. Suggested supplementary readings will be provided (but alignment with our topics and sequencing is tough) CSC 372, Spring 2018, Introduction slide 8

Handouts Handouts of all slides will be provided Three options for handouts with slides: Handouts with selected questions answered Handouts with selected questions unanswered (default) No handouts Mail us to adjust your preference Both versions, as both PDFs and.pptxs, on website CSC 372, Spring 2018, Introduction slide 9

Grading Grading Assignments 60% Pop quizzes 5% Mid-term exam 13% Final exam 22% Ten-point scale: >= 90 is A, etc. Might go lower. Original Thoughts Half-point on final average for each CSC 372, Spring 2018, Introduction slide 10

Assignments Assignments things like: Coding in the various languages Short answer and essay questions Diagrams One video project Late assignments are not accepted! No late days! But, extensions for situations beyond your control. CSC 372, Spring 2018, Introduction slide 11

Collaborative Learning Exercises "Collaborative learning is two or more students laboring together and sharing the workload equitably as they progress toward intended learning outcomes." Barkley et al. This is my first use of CLEs. I welcome your feedback! Exercises typically done during the class period Group size will vary; groups formed in various ways Exercises will be graded Scores will be grouped with assignment points CSC 372, Spring 2018, Introduction slide 12

We'll be grading on lectura You can develop solutions on your own machines but they'll be graded on the CS machine "lectura", and thus should be tested there. Mail us (372s18@cs) TODAY if you haven't worked on lectura or if you feel your knowledge of that eviroment is weak; we'll be happy to help you get up and running there. If you haven't had 352, I recommend you skim through my UNIX slides: http://cs.arizona.edu/classes/cs352/fall15/unix.pdf CSC 372, Spring 2018, Introduction slide 13

Office hours I love office hours! Website has guaranteed hours Open-door policy otherwise In-person interaction is most effective Discord or Skype preferred for IM and screen sharing OK to call my mobile but don't leave voice mail! (Send e-mail instead.) CSC 372, Spring 2018, Introduction slide 14

Attend every lecture. Suggestions for success Arrive on time for lectures. Work through all examples on the slides. Try some what-ifs, too. Read the write-up for an assignment the day it's handed out. Start on assignments early. Don't be a regular in the Thursday Night Club. Don't leave any points on the table. Don't hesitate to ask for help on an assignment. If you get behind, come to office hours right then! Don't make bad assumptions. CSC 372, Spring 2018, Introduction slide 15

Capsule summary: Don't cheat in my class! Don't make it easy for anybody else to cheat! One strike and you're out! NO CHEATING! For a first offense expect these penalties: Failing grade for course Permanent transcript annotation Recommendation for one semester university suspension A typical first step on the road to ruin is sharing your solutions with your best friend, roommate, etc., who swears to just learn from your work and absolutely not turn it in as their work. CSC 372, Spring 2018, Introduction slide 16

No asking the world for help! The material covered in lectures, posted on Piazza, etc. should be all you need to do the assignments. I challenge you to not search the web for solutions for problems on assignments! Posting problem-specific questions on websites, IRC channels, mailing lists, etc. will be considered to be cheating! Example: I'm learning Haskell and trying to write a function that returns True iff the parentheses in a string are properly matched. Any suggestions? CSC 372, Spring 2018, Introduction slide 17

I work for you! My Teaching Philosophy My goal: everybody earns an "A" and averages less than ten hours per week on this course, counting lecture time. Effective use of office hours, e-mail, and IM can equalize differences in learning speed. I should be able to answer every pertinent question about course material. My goal is zero defects in slides, assignments, etc. Bug Bounty: One assignment point Everything I'll expect you to know on exams will be covered in class, on assignments, or on Piazza. CSC 372, Spring 2018, Introduction slide 18

READ THE SYLLABUS! (cs.arizona.edu/classes/cs372/spring18/syllabus.html) CSC 372, Spring 2018, Introduction slide 19

Assignment 1 It's a survey (on the class website) Due Sunday, January 14, 11:00pm Worth 10 points Maybe 10 minutes to complete Thanks for doing it! Assignment 2 On the website Due Sunday, January 21 at 11:00pm Assignment 1 and 2 CSC 372, Spring 2018, Introduction slide 20

Pictures & Name memorization CSC 372, Spring 2018, Introduction slide 21

Basic questions about programming languages CSC 372, Spring 2018, Introduction slide 22

What is a programming language? A simple definition: A system of rules for data manipulation. It is generally agreed that in order for a language to be considered a programming language it must be Turing Complete. One way to prove a language is Turing Complete is to use it to implement a Universal Turing Machine, a theoretical device capable of performing any algorithmic computation. What language is most commonly mis-listed on resumes as a programming language? CSC 372, Spring 2018, Introduction slide 23

The two extremes: Does it matter what language is used? If you ve seen one language, you ve seen them all. Just pick one and get to work. Nothing impacts software development so much as the language being used. We must choose very carefully! CSC 372, Spring 2018, Introduction slide 24

Why study programming languages? Learn new ways to think about computation Learn to see languages from a critical viewpoint Improve basis for choosing languages for a task Add some tools to the toolbox Increase ability to design a new language "A programmer should learn a new language every year." --Recommended in The Pragmatic Programmer CSC 372, Spring 2018, Introduction slide 25

Plankalkül 1945 Short Code 1949 FORTRAN 1957 ALGOL 1958 LISP 1958 COBOL 1959 BASIC 1964 PL/I 1965 SNOBOL4 1967 SIMULA 67 1967 Pascal 1971 C 1972 How old are programming languages? Prolog 1972 Smalltalk 1972 ML 1977 Icon 1979 Ada 1980 C++ 1983 Objective-C 1983 Erlang 1986 Perl 1987 Haskell 1990 Python 1991 Ruby 2/24/93 Java 1995 JavaScript 1995 PHP 3 1998 C# 2000 D 2001 Scala 2003 Clojure 2007 Go 2008 Rust 2010 Kotlin 2011 TypeScript 2012 Julia 2012 Swift 2014 Goaldi 2015 CSC 372, Spring 2018, Introduction slide 26

How many languages are there? The State of the Octoverse 2017 (octoverse.github.com) open source projects written in 337 unique languages wikipedia.org/wiki/alphabetical_list_of_programming_languages 700 +/- The Language List people.ku.edu/~nkinners/langlist/extras/langlist.htm "about 2,500", but lots of new ones missing (URL is 404) Online Historical Encyclopaedia of Programming Languages hopl.info 8,945 but has things like "JAVA BEANS" and minor variants like both ANSI Pascal and ISO Pascal. Bottom line: Nobody knows how many programming languages have been created but it's in the thousands. CSC 372, Spring 2018, Introduction slide 27

How are languages related to each other? Some of the many attempts at a family tree of languages: digibarn.com/collections/posters/tongues levenez.com/lang rigaux.org/language-study/diagram.html www.seas.gwu.edu/~mmburke/courses/csci210- su10/tester-endo.pdf (Seems to be based on hopl.info data.) CSC 372, Spring 2018, Introduction slide 28

Collaborative Learning Exercise What languages are popular right now? cs.arizona.edu/classes/cs372/spring18/cle-poplang.html CSC 372, Spring 2018, Introduction slide 29

Free the programmer from details int i = 5; x = y + z * q; Detect careless errors int f(string s, char c);... int i = f('i', "Testing"); How do languages help us? Provide constructs to concisely express a computation for (int i = 1; i <= 10; i++)... CSC 372, Spring 2018, Introduction slide 30

How languages help, continued Provide portability Examples: C provides moderate source-level portability. Java was designed with binary portability in mind. Facilitate using a paradigm, such as functional, objectoriented, or logic programming. CSC 372, Spring 2018, Introduction slide 31

How are languages specified? The specification of a language has two key aspects: Syntax Specifies the sequences of symbols that are valid programs in the language. Semantics Specifies the meaning of a sequence of symbols. Language specifications fall on a broad spectrum: High end: The specification is a published international standard Low end: The behavior of the lone implementation is the specification. CSC 372, Spring 2018, Introduction slide 32

Syntax vs. semantics Consider this expression: a[i] = x What are some languages in which it is syntactically valid? In each of those languages, what is the meaning of it? What are various meanings for these expressions? x y x y *x CSC 372, Spring 2018, Introduction slide 33

What are the building blocks of a language? Data types Operators Control structures Support for encapsulation Functions Abstract types / Classes Packages / Modules Error / Exception handling Standard library Building blocks CSC 372, Spring 2018, Introduction slide 34

What are qualities a language might have? Simplicity ( mental footprint ) Expressive power Readability of programs Orthogonality Extensibility Reliability of programs Run-time efficiency Practical development project size Support for a style of programming What are some tensions between these qualities? CSC 372, Spring 2018, Introduction slide 35

What factors affect popularity? Available implementations Documentation Community Vectors of infection Ability to occupy a niche Availability of supporting tools, like debuggers and IDEs Buzz Cost CSC 372, Spring 2018, Introduction slide 36

The philosophy of a language What is the philosophy of a language? How is it manifested? C Close to the machine Few constraints on the programmer High run-time efficiency What you write is what you get. C++ Close to both machine and problem being solved Support object-oriented programming As close to C as possible, but no closer. Stroustrup PostScript Page description Intended for generation by machines, not humans What is the philosophy of Java? CSC 372, Spring 2018, Introduction slide 37

A Little U of A CS History CSC 372, Spring 2018, Introduction slide 38

The Founding of UA CS The UA CS department was founded by Ralph Griswold in 1971. (Hint: know this! Mnemonic aid: ASCII 'G' is 71.) Griswold was Head of Programming Research and Development at Bell Labs before coming to UA. Griswold and his team at Bell Labs created the SNOBOL family of languages, culminating with SNOBOL4. Griswold's interest and prominence in programming languages naturally influenced the course of research at UA. CSC 372, Spring 2018, Introduction slide 39

Cg EZ Icon Leo MPD Ratsno Rebus Seque SIL2 SL5 SR SuccessoR Unicon Y UA CS's language heritage In the 1970s and 1980s UA Computer Science was recognized worldwide for its research in programming languages. These are some of the languages created here: Goaldi Along with language design, lots of work was focused on language implementation techniques. CSC 372, Spring 2018, Introduction slide 40

My intersection with Griswold's work I learned FORTRAN IV and BASIC in a summer school course at Wake Forest during the summer after high school. In first trip to library at NCSU, took home a stack of books on programming languages, including SNOBOL4. Was totally mystified. Learned PL/I in two-course introduction to computer science sequence. Took a one-unit course on SNOBOL4 during sophomore year. Used SPITBOL whenever possible in courses thereafter. Attended a colloquium at NCSU where Ralph Griswold presented a new programming language, named Icon. Ported Icon to an IBM mainframe and DEC's VAX/VMS. Went to graduate school here at UA, and worked on Icon as a graduate research assistant for Dr. Griswold. CSC 372, Spring 2018, Introduction slide 41

Quiz! CSC 372, Spring 2018, Introduction slide 42