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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,12f4d07c572005e3 X-Google-Attributes: gid103376,public X-Google-Thread: ff6c8,12f4d07c572005e3 X-Google-Attributes: gidff6c8,public X-Google-Thread: f43e6,12f4d07c572005e3 X-Google-Attributes: gidf43e6,public X-Google-Thread: 10db24,12f4d07c572005e3 X-Google-Attributes: gid10db24,public X-Google-Thread: 1108a1,12f4d07c572005e3 X-Google-Attributes: gid1108a1,public From: Richard Riehle Subject: Re: Java Risks (Was: Ada News Brief - 96-05-24 Date: 1996/06/04 Message-ID: #1/1 X-Deja-AN: 158558715 references: <4o56db$p66@ns1.sw-eng.falls-church.va.us><4omoh4$k0f@ansible.bbt.com <4ov36b$1665@watnews1.watson.ibm.com> to: "Norman H. Cohen" content-type: TEXT/PLAIN; charset=US-ASCII organization: National University, San Diego mime-version: 1.0 newsgroups: comp.lang.ada,comp.sw.components,comp.object,comp.software-eng,comp.edu Date: 1996-06-04T00:00:00+00:00 List-Id: Norman, As you know, I am no advocate of the virtues of C++. However, I do believe that, if one needed to extend C into a OOP language, the decision taken by Stroustrop was, if not brilliant (I do tend to hyperbole sometimes), at least intelligent. The fact that it can lead to kind of absurdities illustrated in your response, does not diminish the intelligence of the idea. It simply shows that there are ways to corrupt it through misuse. My position vis a vis C++ has been that it is not well-suited to the development of software that must work with consistent reliabilty. And you have shown an example to support that view. It is unfortunate that C++ is so vulnerable to exposure from such examples. And it gets worse as new features are added. In particular, the exception handling in C++ is a rather sad sight to behold. On 3 Jun 1996, Norman H. Cohen wrote: > In article , > Richard Riehle writes: > > |> There are aspects of C++ that, as orginally conceived by Dr. > |> Stroustrup, make very good sense. The fundamental idea of > |> expanding the stuct into a class was a stroke of brilliance. > > I disagree. It is the confusion of classes and structs (along with the > confusion of class-as-type-definition and class-as-module) that leads to > absurdities such as the following: > > class C { > protected: > typedef ... T; > static T x; // perfectly legal > struct S { > T x; // illegal: protected "member" T inaccessible inside > } y; // a struct, despite nesting. > } OK, so my langauge is a little exagerrated sometimes. I do think it was kind of a smart idea, even though it does lend itself to the kind of corrupt thinking illustrated in this example. In all honesty, very few C++ programmers would design a class with such an obviously ugly profile. All in all, thanks for a rather amusing example, though. Richard Riehle