home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / programm / 2426 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  2.2 KB

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