From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1c60ab26e5133199 X-Google-Attributes: gid103376,public From: mfeldman@seas.gwu.edu (Michael Feldman) Subject: Re: Ada as a First Language Date: 1997/07/03 Message-ID: <5pgml0$35o@felix.seas.gwu.edu> X-Deja-AN: 254315472 References: Organization: George Washington University Newsgroups: comp.lang.ada Date: 1997-07-03T00:00:00+00:00 List-Id: In article , RC wrote: > >Does any one have any opinions on whether Ada should be introduced as a >first programming language? > >If not, what would be the best introductory language be as a pre-cursor >to Ada. > We (The George Washington University) are one of about 115 colleges and universities using Ada as a first language. I have taught Ada in the _second_ course since 1982, and in the _first_ course since 1991. I write from personal experience, not from theory or speculation. Thousands of students have passed through these courses. Others' mileage may, of course, vary.:-) Before jumping into details, a few URLs for you: http://www.seas.gwu.edu/faculty/mfeldman/CS1-2.html (a list of the colleges and universities using "Ada first") http://www.seas.gwu.edu/classes/cs1 http://www.seas.gwu.edu/classes/cs2 (exhaustive detail on our first and second courses, with full texts of assignments, lots of program files, exams, etc.) http://www.seas.gwu.edu/ada (some of our Ada-related research, and other links) http://www.acm.org/sigada/education (Ada Resources for Educators and Students) http://academic.uofs.edu/faculty/beidler/levy (a nice article on teacher satisfaction with their foundation languages - Ada and Scheme rank high, C and C++ rank low) Now on to the details. I cannot speak for others, but my choice is based on Ada's being the _optimal_ one for this audience. Note: _optimal_. Nothing is perfect in this world; choice of a foundation language, like so many other things, is an optimization problem filled with tradeoffs. In my view, Ada comes out ahead of the others, as a first language, because (in no particular order) - it retains everything we've _liked_ about Pascal, including: - compile-time checking where possible, run-time checking where necessary (students at this level rarely need to use a debugger - many common bugs are detected by the compiler, and runtime checks pick up many others) - clear and reasonably obvious syntax, with few possibilities for single-keystroke errors that result in a compilable program that has bizarre runtime behavior - subrange types allowing one to specify a meaningful _range_ of values (e.g. a variable cannot meaningfully go negative) - nice inner-syntactic improvements to Pascal, including: - full bracketing (if/end if, etc.) which minimizes "semicolon problems", dangling else's, etc. - named parameter association in subprogram calls - I have found this VERY helpful in teaching procedures, because the formal and actual parameters appear side-by-side in the call - "system structure" extensions to Pascal, including: - packages (modules, units) with a clear division of interface and implementation into separate files - well-defined exception definition and handling, in which system and user-defined exceptions are treated similarly - private types - procedure, function, and operator name overloading - well-defined generic template capability - type extension and polymorphism - language-defined concurrency primitives (the last 3 are really 2nd-course matters, but they "trickle down" a bit into first courses with good students) - a well-constructed and stable standard, with validation testing and therefore an especially high degree of commonality in the language supported by different compilers for different platforms. This is especially important in education, because students can move their code from (say) a home PC to (say) a university Unix box with no worry about whether it'll compile and run. - platform-dependent features like graphics are implemented using packages, not new syntax. There are no syntactic dialects. Obviously, programs that use PC-specific graphics (say) will not work on Unix boxes, but this is, itself, a good lesson about machine independence vs. machine dependence. In general, Ada helps us with this because the platform-specific packages are pretty obvious, so students desiring to move code around can simply avoid them. - several families of Ada 95 compilers available at no cost (GNAT) or moderate cost (ObjectAda) for nearly all popular platforms Whew! I'll stop here, but you get the idea. I'll be glad to participate in a continuing thread on this, as long as it does not degenerate into a language war. Feel free to make contact by e-mail if you wish. Michael Feldman ------------------------------------------------------------------------ Michael B. Feldman - chair, SIGAda Education Working Group Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5919 (voice) - 202-994-0227 (fax) http://www.seas.gwu.edu/faculty/mfeldman ------------------------------------------------------------------------ "Cooperate with those who have both know-how and integrity." Fortune cookie, Wu Dynasty, Bethesda, MD, Spring 1996. ------------------------------------------------------------------------ Ada on WWW: http://www.acm.org/sigada/education or http://www.adahome.com ------------------------------------------------------------------------