90 likes | 345 Views
CS 341 Programming Language Design and Implementation. Introductions Joe Hummel, PhD Research Associate Professor, 1218 SEO Why study programming languages? language impacts how you think language impacts how the computer behaves Then we'll discuss the administrative stuff….
E N D
CS 341 Programming Language Design and Implementation • Introductions • Joe Hummel, PhD • Research Associate Professor, 1218 SEO • Why study programming languages? • language impacts how you think • language impacts how the computer behaves • Then we'll discuss the administrative stuff… CS 341 -- 13 Jan 2013
Language impacts how we think… • Example: • write function to sum an array of 100 integers, return result intsum(int A[100]) { } CS 341 -- 13 Jan 2013
Now write the same function without variables • No local variables, no global variables, no ref parameters ― i.e. no memory whose contents "vary" intdosum( { } intsum(int A[100]) { } Hint: call a recursive helper function to compute the sum… CS 341 -- 13 Jan 2013
So? • You should learn other ways to solve problems… • more efficientin computer execution • more productive of your time (i.e. you solve it faster) • easier to reason about correctness of solution • easier to parallelize • and more… CS 341 -- 13 Jan 2013
Another example… • Given an array of N Student objects, output names of all students with avg >= 70.0, in ascending order: class Student { public string Name; public double GPA; . . } void StudentsWithPassingAvg(Student S[N]) { } CS 341 -- 13 Jan 2013
What's a better way? • LINQ • Language Integrated Query… void StudentsWithPassingAvg(Student S[N]) { } CS 341 -- 13 Jan 2013
Programming… • We'll be using Visual Studio 2012 / 2013 • We'll have occasional "programming days" in class • I'll let you know when to bring laptops / tablets • We'll be programming in a variety of languages • F# • C# • SQL • Chapel • More importantly, we'll be learning different paradigms • Imperative • Functional • Object-oriented • Declarative • Parallel CS 341 -- 13 Jan 2013
Syllabus: • contact info, twitter feed, course web page • http://www.joehummel.net/cs341.html • textbook • "Programming Language Pragmatics", 3rd edition, by M. Scott • use piazza for questions, no email • grading • HWs / final project== 40% • quizzes == 30%, final exam == 30% • 6 quizzes, see schedule • academic honesty • class schedule CS 341 -- 13 Jan 2013