Xref: utzoo comp.object:3569 comp.lang.c++:13605 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!uunet!mcsun!hp4nl!media03!pkr From: pkr@media03.UUCP (Peter Kriens) Newsgroups: comp.object,comp.lang.c++ Subject: C++ and waitresses (long) Message-ID: <2325@media03.UUCP> Date: 23 May 91 13:58:10 GMT Organization: Mediasystemen, Netherlands Lines: 65 amount of time it takes to order a simple sandwich. They start asking you if you want onions, or mustard, on the rye, with lettuce, without tomatoes. I usually get confused because I am usually in a discussion while in a restaurant. I just say a sandwich, but then the waitress will continue to force me to chose me between an awfull lot of options. When I started studying C++ because I needed to teach it to a class, I got a funny deja vu feeling, remembering the American waitress. You can do it virtual, but you can also do it not virtual, but then you have problems there. You can make it static, but static in that context means something different in that context, you can use references or copying of values. It keeps forcing you to make decisions which hardly have anything to do with the problem domain, but are just a kind of goodies giving you certain optimisations in certain cases. C++ looks to me like a big bag of options, and you just pick what you like. Which I think is proven by the fact that in any discussion with a C++'er, you will always hear the answer that you can also do it that way in C++. It seems that people have added so much to the language, that it has become an Edsel, having features for all of us, but without identity. Am I alone in that fact that I do not like to chose all the time. I feel distracted because I have to spent so much time choosing and then later reworking because I made the wrong choice. The language does not seem to have a natural concept. When you look at different implementations made by different people they look completely different. From my experience in Smalltalk I found that people tend to build the same kind of solutions to the same kind of problems. It seems to me that that will hinder the reuse of software. If you look at the NIHCL library, it is build in a structure that is quite different from commercial available class trees. Will that not mean that it will be very hard to reuse generic code. When I look at other modern languages I see that they tend to remove the number of language options, but have a very generic simple concept. Lisp and Prolog use lists and atoms and Smalltalk has the basic object. All of these languages seems to be able to get away with no language defined keywords, allowing the user to built constructs from a very simple syntax. Do we need all those diverse tools while a small subset allows us to build the same kind of constructs. Would a small language not be much easier to learn and allow more reuse? Saving in training and building cost? Isn't this big bag of options making the language extremely difficult to learn, as I can also see in the classes I teached C++, and will it not make it impossible to get the compilers right. Will the amount of options make it impossible to validate a compiler? This way of thinking reminds of RISC versus CISC. They changed the CPU's to become much simpler, thereby offering more performance. Isn't C++ a CISL? And even the supposed biggest strength, type checking, seems to get in the way because every time I need to do something usefull, I need downcasting. And then I do not have any error check at all. If you look at the NIHCL classes, they even included a run time check for class when they need to downcast. Just like the const type, I threw them away after seeing how much I needed to remember that an object was const. I am very curious about the opinion of other people about this subject. I do not want to just criticize. Some parts of C++ are elegant and allow for nice code, but I really miss the idea behind the language. I hope I am not right in my judgement. It would be such a waste of all the efforts that go into the language currently. Peter Kriens pkr@media01.uucp