Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!convex!texsun!pitstop!sundc!seismo!uunet!munnari!mulga!ttey From: ttey@mulga.oz (YEO Tee Thiam Eric) Newsgroups: comp.lang.c++ Subject: Re: C++ considered disenchanting Message-ID: <3006@mulga.oz> Date: 18 Oct 88 11:58:37 GMT References: <2010@cs.Buffalo.EDU> Organization: Comp Sci, Melbourne Uni, Australia Lines: 45 in article <2010@cs.Buffalo.EDU>, crovella@sunybcs.uucp (Mark Crovella) says: > These are minor points, but the overall result seems to be a perception > that the language is a bit "hairy". I agree. I strongly believe that a language should be as simple as possible for 2 reasons: (a) a compiler/preprocessor can easily be constructed and possibly proven correct, (b) it is easier to formalise the semantics of the language and remove ambiguity. In the case of C++, the syntax of the language is, in my opinion, too complicated. It is so complex that it has been said that to parse C++ correctly, a recursive decent parser with an infinite look ahead and some heuristics is required (I believed it was mentioned in some documentation for GNU G++). > As for Dave's conclusion (i.e., a disassociation between himself and C++), > I think that in large part this may not be the fault of C++, but rather > in the toolset we use and in the orientation we have to programming in C++. > The problems we have had using C++ would be well solved through the use > of a more comprehensive programming environment for the language. > > I propose a discussion of the necessary, appropriate, and/or ideal > tools and techniques for C++ programming. > For example, a tool to resolve virtual function scoping dynamically. > A "Flavor Inspector" -- a class examination tool. An object inspector. > A dynamic debugger which runs C++ interpretively. etc. > > The questions Dave raises are important -- I think it would be interesting > to hear people's views on them. A good programming environment similar to that of Smalltalk would certainly be nice. (Much feasibility studies need to be done on this since C++ is a static language compared to Smalltalk.) However, I generally found that when programming in C++, people tend to be carried away with object-orientedness of the language; using derived classes, etc, etc at every opportunity to model things that are better left as structures. Object-oriented programming is a paradigm. We are now finding more and more ways of using this paradigm to model our problems. C++ helps in acheiving this but it is by no means the best and only way of programming. I believe that the essence of object- oriented programming is in choosing what to be modelled as objects and what to be treated as pure data structure. Eric Yeo