home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!agate!linus!linus.mitre.org!church.mitre.org!crawford
- From: crawford@church.mitre.org (Randy Crawford)
- Newsgroups: comp.programming
- Subject: Re: Teaching the basics
- Message-ID: <1992Aug22.031717.19281@linus.mitre.org>
- Date: 22 Aug 92 03:17:17 GMT
- References: <ratner.714247759@ficus.cs.ucla.edu> <13226@bnr-rsc.UUCP> <1992Aug21.141617.22808@nstn.ns.ca>
- Sender: news@linus.mitre.org (News Service)
- Organization: The MITRE Corporation, McLean, VA
- Lines: 29
- Nntp-Posting-Host: church.mitre.org
-
- In article <1992Aug21.141617.22808@nstn.ns.ca> maceache@fox.nstn.ns.ca (Tim Maceachern) writes:
- >I think some of the arguments in this thread would have to be modified
- >if c++ were used for the beginning language with a suitable class
- >library for beginners -- for instance the var class recently posted. In
- >particular, would it be possible to teach a c++ course without pointers
- >if everything is hidden in a supplied object?
-
- Yes, as long as you were satisfied with some inability to construct your own
- classes, or extend existing ones. This isn't really a problem if you expect
- the students to use the OOPL to program in a somewhat non-OO manner -- to
- use the data types which the language (and the instructor) give you and not
- be fully able to "roll your own". However, to build the sophisticated ADTs
- in C++ (which are the hallmark of OOPLs) you need to be able to use dynamic
- memory -- and pointers.
-
- It _is_ an interesting idea, to introduce students to C++ and OOP without using
- pointers. They could get their feet wet in OO programming, overloading
- functions, deriving classes, creating simple classes, and _using_ the more
- sophisticated data types like list classes, queue classes, tree classes, etc.
- Then after they have a sense of the power of OOP, teach them about the
- infrastructure in C++ that makes it all possible. They could accomplish most
- of what they need from pointers simply by using references.
-
- Not a bad idea.
- --
-
- | Randy Crawford crawford@mitre.org The MITRE Corporation
- | 7925 Colshire Dr., MS Z421
- | N=1 -> P=NP 703 883-7940 McLean, VA 22102
-