Programming LanguagesCourse PersonnelCourse LogisticsCode of ConductLate Submission PolicyCourse MaterialsOther Helpful BooksSyllabusSome Course GoalsDijkstra on Language Design What’s Worth Studying? Languages in Common UseFlon’s AxiomLatest TrendsSupport for AbstractionReliabilityWhat Does This C Statement Mean? OrthogonalityEfficient Implementationslide 1Vitaly ShmatikovCS 345Programming Languageshttp://www.cs.utexas.edu/~shmat/courses/cs345/slide 2Course PersonnelInstructor: Vitaly Shmatikov• Office: CSA 1.114• Office hours: Tuesday, 3:30-4:30pm (after class)• Open door policy – don’t hesitate to stop by!TAs: Jeremy Stober and Austin Waters• Office: PAI 5.38 (TA station #1)• Office hours: Monday, 2-3pm and Wednesday, 1:30-2:30pm (Jeremy), TBA (Austin)Watch the course website• Assignments, reading materials, lecture notesslide 3Course LogisticsLectures: Tuesday, Thursday 2-3:15pm Homeworks and programming assignments• 49% of the grade (7 assignments, 7% each)Three in-class exams (2 midterms and final)• 51% of the grade (17% each)No make-up or substitute exams!If you are not sure you will be able to take the exams in classon the assigned dates, do not take this course!slide 4Code of Conduct• UTCS Code of Conduct will be strictly enforced• All assignments are strictly individual• Unless explicitly stated otherwise• “ We were just talkin’ ” is not an excuse• No Googling for answers!• You do not want me to catch you cheatingslide 5Late Submission PolicyEach take-home assignment is due in class at 2pm on the due dateYou have 3 late days to use any way you want• You can submit one assignment 3 days late, 3 assignments 1 day late, etc.• After you use up your days, you get 0 points for each late assignment• Partial days are rounded up to the next full dayslide 6Course MaterialsTextbook: Mitchell. “Concepts in Programming Languages.”• Attend lectures! Lectures will cover some material that is not in the textbook – and you will be tested on it!Harbison, Steele. “C: A Reference Manual.”(5thedition)Occasional assigned readingsslide 7Other Helpful BooksBison ManualDybvig. “The Scheme Programming Language.”Harper. “Programming in Standard ML.”All of these are available for free online• See links on the course websiteslide 8SyllabusSurvey of fundamental concepts underlying modern programming languages• Goal: understand paradigms, not vocational training in any given language• Examples drawn from ANSI C, C++, Java, Scheme, ML, JavaScript …Procedural / imperativeFunctional / applicativeObject-orientedConcurrentslide 9Some Course GoalsLanguage as a framework for problem-solving• Understand the languages you use, by comparison• Appreciate history, diversity of ideas in programming• Be prepared for new methods, paradigms, toolsCritical thought• Identify properties of language, not syntax or sales pitchLanguage and implementation tradeoffs• Every convenience has its cost– Recognize the cost of presenting an abstract view of machine– Understand tradeoffs in programming language designslide 10Dijkstra on Language Design “The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.” “APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.” “FORTRAN, 'the infantile disorder’ … is hopelessly inadequate forwhatever computer application you have in mind today: it is nowtoo clumsy, too risky, and too expensive to use.” “It is practically impossible to teach good programming to studentsthat have had a prior exposure to BASIC: as potentialprogrammers they are mentally mutilated beyond hope ofregeneration.”slide 11What’s Worth Studying? Dominant languages and paradigms• C, C++, Java… JavaScript? • Imperative and object-oriented languagesImportant implementation ideasPerformance challenges• ConcurrencyDesign tradeoffsConcepts that research community is exploring for new programming languages and toolsslide 12Languages in Common Use[F. Labelle]Based on open-source projects at SourceForgeslide 13Flon’s Axiom“There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code.”-Lawrence Flonslide 14Latest TrendsCommercial trends• Increasing use of type-safe languages: Java, C#, … • Scripting and other languages for Web applicationsTeaching trends: Java replacing CResearch and development trends• Modularity• Program analysis– Automated error detection, programming environments, compilation• Isolation and security– Sandboxing, language-based security, …slide 15Support for AbstractionData• Programmer-defined types and classes• Class librariesProcedural• Programmer-defined functions• Standard function librariesslide 16ReliabilityProgram behavior is the same on different platforms• E.g., early versions of FortranType errors are detected• E.g., C vs. MLSemantic errors are properly trapped• E.g., C vs. C++Memory leaks are prevented• E.g., C vs. Javaslide 17What Does This C Statement Mean? *p++ = *q++increments p increments qmodifies *pDoes this mean… … or … or*p = *q;++p;++q;*p = *q;++q;++p;tp = p;++p;tq = q;++q;*tp = *tq;slide 18A language is orthogonal if its features are built upon a small, mutually independent set of primitive operations.Fewer exceptional rules = conceptual simplicity• E.g., restricting types of arguments to a functionTradeoffs with efficiencyOrthogonalityslide 19Embedded systems• Real-time responsiveness (e.g., navigation)• Failures of early Ada implementationsWeb applications• Responsiveness to users (e.g., Google search)Corporate database applications• Efficient search and updatingAI applications• Modeling human behaviorsEfficient
View Full Document