CSC302.01 2007S, Class 01: Introduction to the Course Admin: * Do Wednesday's readings (distributed in class). * HW1: Intro Survey (due Wednesday). * Upcoming talks (extra credit for attending) * Johanna Meehan on vocation, Thursday, 11:00 a.m. * John David Stone on Life, Thursday, 4:15 p.m. Overview: * What is a programming language? * How should we study programming languages? * Why study programming languages? * Course details. /What is a Programming Language?/ * DK: A grammar for instructing machines how to do things * SS: A grammar is syntaxes and semantics * EO: A syntax is a way to formally structure words/commands * KG: A semantics gives the meaning of the language * KG, waking up: Syntax tells you how to say it, Semantics tells you what you said. * JT: The language itself does not directly instruct the machine; rather, it is traditionally compiled into a language that the hardware of the machine can interpret ("machine code") * Refinement (group): A language (syntax and semantics) in which a "programmer" can write programs that (eventually) instruct the computer on how to do things. * DD: Humans are also an audience * Refinement: Programming languages are languages in which one can express computation for execution by a computer or understanding by a sentient being. Why are we spending a semester on languages? * We should know some theory, not just practice. * We do some theory of languages in 341. * This class focuses more on the general design - What makes a language good or interesting * We should know some practice, not just theory * We will also discuss some language issues that professional programmers use, but that we don't necc. cover elsewhere in the curriculum. * Continuations * Reflection or Introspection in OO languages * Permit Grinnell graduates to adapt to other languages * Historical import: It used to be that Functional Programming and Object-Orietned programming were only covered in this class. * EO: Opportunity to unify the piecemeal ideas we've learned in other classes (and "piecemeal" is intended as a compliment) * Unfortunately, Sam likes thinking in piecemeal. * SR: Evidence that any sufficiently complex program requires its own own language * It helps to know some of the issues in designing a language * Past students: Helps you choose the right language (or paradigm) for the task. * Past students: If we talk about compilation, can think about how to write more efficient code * E.g. In tail recursion, the recursive call is the last thing you do. * Hence, instead of using a call stack, the compiled code can simply jump to the beginning * SR: Language wars! How do we study languages? * Implementation * "Language of the Week" * Syntax and Semantics * Unifying design issues * Hybrid * A bit of implementation of Scheme * Languages of the week: * PostScript * Prolog * SQL * Ruby * Syntax and Semantics - not much this semester * More on languages you know * Higher-order programming in Scheme * Continuations in Scheme (and their use in Web servers) * Introspection in Java * More practice in C How the course works: * Before every class, you do some reflective reading (10-40 pages) * 8 p.m. the night before: Send me reflections on each reading * Sam synthesizes class from the comments/questions * Discuss reading and related issues in class Also: * Some homework assignments * One group presentation at the end of the semester * Midsem * Final