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: 107f24,626a0a064b320310 X-Google-Attributes: gid107f24,public X-Google-Thread: f4fd2,626a0a064b320310 X-Google-Attributes: gidf4fd2,public X-Google-Thread: 103d24,626a0a064b320310 X-Google-Attributes: gid103d24,public X-Google-Thread: 103376,ea8ea502d35ca2ce X-Google-Attributes: gid103376,public X-Google-Thread: 10259a,626a0a064b320310 X-Google-Attributes: gid10259a,public X-Google-Thread: 114809,626a0a064b320310 X-Google-Attributes: gid114809,public X-Google-Thread: 1164ba,626a0a064b320310 X-Google-Attributes: gid1164ba,public X-Google-ArrivalTime: 2001-05-10 13:27:28 PST Path: newsfeed.google.com!sn-xit-03!supernews.com!freenix!sunqbc.risq.qc.ca!newsfeed.mathworks.com!nycmny1-snh1.gtei.net!news.gtei.net!hermes2.visi.com!news-out.visi.com!ruti.visi.com!not-for-mail Newsgroups: comp.lang.ada,comp.lang.lisp,comp.lang.smalltalk,comp.lang.basic,comp.lang.functional,comp.lang.scheme,comp.lang.perl Subject: Re: Beginner's Language? References: <9cukad$nn68@news-dxb> <9dbi83$sji$1@nh.pace.co.uk> <5WjK6.72$Dd5.32782@ruti.visi.com> From: thornley@visi.com (David Thornley) Message-ID: Date: Thu, 10 May 2001 20:17:43 GMT NNTP-Posting-Host: 209.98.98.8 X-Complaints-To: abuse@visi.com X-Trace: ruti.visi.com 989525863 209.98.98.8 (Thu, 10 May 2001 15:17:43 CDT) NNTP-Posting-Date: Thu, 10 May 2001 15:17:43 CDT Xref: newsfeed.google.com comp.lang.ada:7504 comp.lang.lisp:9989 comp.lang.smalltalk:9703 comp.lang.functional:5638 comp.lang.scheme:3788 comp.lang.perl:2792 Date: 2001-05-10T20:17:43+00:00 List-Id: In article , Ola Rinta-Koski wrote: >thornley@visi.com (David Thornley) writes: >> C++, properly taught, does. I don't know if it's properly taught >> anywhere. I've taught C as a first language successfully, and the >> areas that gave the most trouble are the areas that I could avoid >> using C++. No more pointers, C-style arrays, C-style string handling, >> or printf/scanf. > > I must be missing something here. What kind of non-trivial program > can be written without pointers in C++? Certainly not one using any > OOP features like virtual functions etc. You can rewrite most C programs that use pointers into C++ programs that use references and STL vectors, and it is certainly possible to write non-trivial C programs. In the context of this thread, I'm talking about teaching people to program using a language, not teaching them how best to use a language. If I were teaching an introduction to programming class, I'd leave object orientation for later. Even there, you don't have to use pointers heavily. Common Lisp and Java aren't difficult because almost everything is a pointer in both languages. If you teach things like Fnord *foo = new Fnord; .... foo->bar(baz); you can get polymorphism without getting as deep into pointers as I had to do halfway through an Introduction to Programming in C class. I think C++ can be an excellent introductory language, provided everybody is using standard compilers with standard libraries. Just don't try to cover anywhere near the whole language in the introductory course. -- David H. Thornley | If you want my opinion, ask. david@thornley.net | If you don't, flee. http://www.thornley.net/~thornley/david/ | O-