The Forum for Discussion about The Third Manifesto and Related Matters

Please or Register to create posts and topics.

"Ruinous inheritance" (again)

PreviousPage 2 of 2
Quote from dandl on April 11, 2026, 1:55 am
Quote from Dave Voorhis on April 10, 2026, 7:11 pm
Quote from dandl on April 10, 2026, 12:24 am

The concept that makes OO useful, as compared with earlier languages, is that of little packets of state bundled with operations on that state. Fortran, Cobol, Basic, Pascal, C did not have that.

Pascal and C provide that via C structs, Pascal records, and functions/procedures that restrict parameter arguments to specified struct/record types.

Believe me I know it, used it, lived it and no, they really didn't. They're not bundled until you get them into the type system as class types.

For Fortran, COBOL and BASIC, it depends which Fortran, COBOL or BASIC (or Basic) you're talking about.

The ones in existence when C++ and then Java went mainstream. Anything added since then is copycat.

What they didn't have (largely -- depends which Pascal, at least) are visibility modifiers to implement information hiding.

There are OO languages without private scope.

?

I'm the forum administrator and lead developer of Rel. Email me at dave@armchair.mb.ca with the Subject 'TTM Forum'. Download Rel from https://reldb.org
Quote from dandl on April 11, 2026, 5:12 am

Java baled on that one, to its eternal shame. Value types and generics are the main reason I (strongly) prefer C#.

Java record types are notionally value types, or at least close enough for jazz.  Java's type erasure is occasionally an issue but rarely has much impact in practice.

The impactful differences between Java and .NET tend to be more about the qualities of their respective ecosystems than differences between languages.

I'm the forum administrator and lead developer of Rel. Email me at dave@armchair.mb.ca with the Subject 'TTM Forum'. Download Rel from https://reldb.org
PreviousPage 2 of 2