Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!Apple.COM!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: C++ Message-ID: <4166@internal.Apple.COM> Date: 14 Sep 89 21:11:50 GMT Sender: usenet@Apple.COM Organization: Objects-R-Us, Apple Computer, Inc. Lines: 34 References:<336@castle.ed.ac.uk> <13519@well.UUCP> <6494@columbia.edu> <2614@husc6.harvard.edu> In article <2614@husc6.harvard.edu> siegel@endor.harvard.edu (Rich Siegel) writes: > so elegant? In my opinion, C++ is a kitchen-sink language, some features > of which are very useful, but many others of which are just in there because > they seemed like the right thing to have. "Typesafe linkage"? So that the > wrong routine gets called just because I pass the wrong number of > parameters? "Default parameters"? Just because I'm too lazy to pass the > right number of parameters? I agree with you that C++ is a kitchen-sink language. Its biggest failing is that it suffers from the C Philosophy of letting the programmer get close to the machine language, and providing the maximum efficiency at the expense of elegance. (The best example is stack-based objects, which are nice for efficiency, but introduce a ton of complications into the language.) I disagree about type-safe linking, however. This actually is a big win, for the same reason compile-time type-checking is a win. It catches errors early in the game. For example, you can catch errors if you try to link with a library that was compiled with direct 68881 calls with a program that wasn't. (The type signatures of won't match.) Default parameters are useful along with function overloading. It provides another mechanism for overloading a function name, without having to write a separate procedure. It is true, however, that you can get into trouble when you use default parameters (and overloading, for that matter). Larry Rosenstein, Apple Computer, Inc. Object Specialist Internet: lsr@Apple.com UUCP: {nsc, sun}!apple!lsr AppleLink: Rosenstein1