home—lectures—recipe—hws—exams—D2L—zoom (snow day)
ITEC380 in Retrospect
Looking back, what have we learned in this course?
Well, I'll give my take,
because I've found that sometimes students have different ideas
of what this class was about,
or wonder
We didn't learn new programming languages, so what was this class about?
.
The major themes of the class included:
- Our homeworks culminated in implementing an interpreter, which involved:
- grammars (expressing syntax rules) -- reading them, and writing them.
- representing parse trees [using combinations of union- and struct-types]
- parsing (recursive-descent), to turn text into the tree-representation
- variables: free vs bound; scope;
function-closures
(incl. being clear about (function)-names
vs function-values (lamdda) vs function-applications)
- Understanding functional programming paradigm:
- use of immutable data [an in-depth approach, incl. writing a videogame]
- higher-order functions (collection-processing like map,filter,reduce;
adaptor-pattern like shapes-in-a-row for functions that needed extra or fewer args;
functions that return new functions like and/f, not/f)
- how loops are equivalent to tail-recursion [re-use stack frame = loop's byte code]
- understanding what is meant by "declarative programming
- the spec *is* the program
(and perhaps changing your notion on how technical/precise you can be
when defining an interface, separate from its implementation)
- Prolog's pattern-matching (unification), as a bonus
- (perhaps:) the notions of syntactic-sugar, and "macros": rules for
transforming one syntax-tree into a different one.
(e.g. `let*` is sugar for nested-`let`s;
define-for-functions is sugar for plain-old define-for-constants plus lambda)
To do this, we got some other things along the way:
- the concept of union-types
(with sentinel-values being a special-case, often "String-or-null")
- combining union-types and structs ("product types") to model
things such as lists and trees,
and how the natural, template-driven code
follows the data-definitions.
the racket class
Although students tend to call itec380 "the racket class",
I'll claim we DID NOT LEARN RACKET, hardly.
We covered only six keywords; five of the concepts are also covered
in the first couple weeks of Java I:
call-a-function `(`; if-else-if `cond`,
declare a global variable `define`; declare a local variable `let`;
create a function-value `lambda`; and `define-struct`.
If teaching racket, we'd have covered the module-system, mutation,
for-loop forms, and much more.
However, a couple of things you may have learned (while using racket) was:
- using a *lightweight* language where you can easily write significant
programs using just those six constructs -- that was perhaps new.
- experience with dynamic type-checking
[and understand both: people who prefer a static type-system's guarantees,
as well as those who argue that static-typing sometimes just slows them down]
You can now better gauge what various keywords in Java are buying you:
when they are helping protect you from errors, and when they are causing
you to have to jump through hoops to appease the compiler/language.
At the start of the class, I said that my goals was to get you to think
differently about programming (even just writing your Java programs).
Merry programming, and Happy New Year!
--Ian
home—lectures—recipe—hws—exams—D2L—zoom (snow day)
 This page licensed CC-BY 4.0 Ian Barland Page last generated | Please mail any suggestions (incl. typos, broken links) to ibarland radford.edu |
 |