[GAP] advice on Ada in general programming languages course
ed schonberg
schonberg at gnat.com
Thu Apr 21 17:18:48 CEST 2005
Ted Baker wrote:
>Dear GAP discussion list members:
>
>I'm looking for ideas on how to "hook" students on Ada in the
>course I am scheduled to teach next fall. In particular, I am
>interested in hearing if anyone else has taught a course like this
>before and how they worked Ada into it, and whether you are aware
>of any reference materials and Ada software artifacts or tools
>that would fit this course. I am also hearing comments/criticisms
>on some of the ideas I have been considedring.
>
>
>
I am currently teaching the MS-level course in Programming Languages,
which could very well be an upper division undergraduate course. In
general the course has been very well received, even though (or perhaps
because?) they get a good amount of Ada in it. I start with Ada, to
cover the basic structure of imperative languages (object-orientation
left for later) and discuss the type system in detail. This allows for
interesting comparisons when discussing C++, Java, and C# (which are
brought in at various points). I.e. all the others can be found wanting
in small and large ways, without belaboring the point.
I discuss inheritance mostly in the context of C++ because for many of
them it's the first exposure to the language and as professionals they
need it. There is a couple of lectures on concurrency, and Ada comes
back, to be contrasted with Java threads. There is a section on generic
programming, with Ada
in detail, C++ templates ditto, and Java more lightly. Then it's on to
functional languages (LISP and some ML, mostly for type inference).
We've dropped Prolog altogether from the course, but I usually sneak in
one lecture on APL and its modern incarnation, J. You can check the
current materials for the course at
http://www.cs.nyu.edu/courses/spring05/G22.2110-001/index.html
One assignment that proved very instructive this semester was an
implementation of dynamic dispatching in an imperative language without
inheritance, i.e. how dispatch tables and access to subprograms work
under the covers. Another one dealt with interfaces and general
set-manipulation routines that deal with multiple implementations. In
general I find that short assignments on a variety of language features
work better than large projects over several weeks, a reflection of the
attention span of the new generation?
Ed Schonberg
More information about the GAP
mailing list