Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!prism!scotty!hernan From: hernan@scotty.gatech.edu (Hernan Astudillo R.) Newsgroups: comp.lang.c++ Subject: On language features and teaching Message-ID: <24537@hydra.gatech.EDU> Date: 18 Mar 91 04:06:20 GMT References: <27C523A2.2155@tct.uucp> <66645@brunix.UUCP> <27CE9CDC.4FD2@tct.uucp> <1991Mar4.082637.24821@gpu.utcs.utoronto.ca> <1991Mar15.204355.10222@ccu.umanitoba.ca> Sender: news@prism.gatech.EDU Reply-To: hernan@cc.gatech.edu (Hernan Astudillo R.) Organization: College of Computing, Georgia Institute of Technology Lines: 39 In article <1991Mar15.204355.10222@ccu.umanitoba.ca> rpjday@ccu.umanitoba.ca writes: >[...] the more obscure and infrequently-used the >feature of C++, the harder it is to come up with an example to >convince rookies that, yes, there really is a use for such a feature. >Just teaching the feature is easy. Convincing people that there is >a practical use for it is harder [...] Perhaps they are difficult to prove useful because they are not very useful indeed. Many language "features" are a product of history, or of design decisions that perhaps wouldn't be the same if taken now. Just because they are there doesn't mean that they *must* be used, much less taught. That as a first comment. Going to the bottom of the problem, I think that the purpose of teaching a particular language is to produce a programmer capable of (1) solving problems using the overall approach favored and supported by the language, and (2) enable him to do it with quality (maintainable, clean, etc.) Granted, some people will only want to learn new tricks, but in general a good coder doesn't make a good programmer. Additionally, we might want to compare the language style or features with those of other languages. In the case of C++, we could (for example) show the usefulness and tools for encapsulation (class), polymorphism by subtyping (subclassing), reuse code (inheritance), and so on. This will eventually lead to key features such as virtual functions, public inheritance, or friend classes. Secondary features (but very nice to have) like default arguments can be sprinkled in examples. Finally, certain "features" better remain untouched, like (in C) non-prototyped functions or (in Pascal) gotos. They do exist and they are needed to read old code, but there is no need of *teaching* them to new people, much less "prove their usefulness". --hernan -- Hernan Astudillo R. Internet: hernan@cc.gatech.edu College of Computing, Georgia Tech, Atlanta GA 30332 "All things are possible, but not all things are advantageous."