Docsity

CSE 505: Programming Languages - Introduction to Programming Languages, Lecture notes of Programming Languages

Partial preview of the text

Download CSE 505: Programming Languages - Introduction to Programming Languages and more Lecture notes Programming Languages in PDF only on Docsity!

CSE 505

Programming Languages

Intro

Today: Introduction

Administrivia

Motivation and Goals

Overview

Caml Crash Course

Resources

Web:

http://courses.cs.washington.edu/
courses/cse505/13au/

Mailing List:

[email protected]

Piazza:

(your course email will be subscribed)

Structure

4-5 Individual Homeworks:

  • “pen & paper” (TeX) proofs
  • implementations in OCaml
  • challenge problems optional

Midterm & Final

Useful, Optional Reference

Pierce’s Types and Programming Languages

Academic Integrity

Do. Not. Cheat.

Erodes the very foundation of academia.
Absolutely not worth the risk.

Roughly:

Discuss problem and sketch ideas together.
Write your own solutions, note discussion partners.

When in doubt, ask!

Today: Introduction

Administrivia

Motivation and Goals

Overview

Caml Crash Course

The magic of myth and legend has been realized in our time. One simply types the correct incantation on a keyboard, and a display screen comes to life, showing things that never were nor could be. Fred Brooks

http://cs.brown.edu/events/talks/notkin.html

wat

https://www.destroyallsoftware.com/talks/wat

Room For Improvement

Development

quickly produce high quality code in teams

Maintenance

comprehend, extend, fix bugs, tune

Reliability

avionics, medicine, finance, nuclear power

Require reasoning!

Safe to optimize / refactor?

class A { int f() { return 0; } } class B { int g(A x) { try { return x.f(); } finally { foo(); } } } class A { int f() { return 0; } } class B { int g(A x) { return 0; } }

... nope.

A could be extended x could be null s could have “side effects”

Safe to optimize / refactor?

How can we handle general case? How can we be sure it’s right? How do we automate?