"Ruinous inheritance" (again)
Quote from Dave Voorhis on April 11, 2026, 4:26 pmQuote from dandl on April 11, 2026, 1:55 amQuote from Dave Voorhis on April 10, 2026, 7:11 pmQuote from dandl on April 10, 2026, 12:24 amThe 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.
?
Quote from dandl on April 11, 2026, 1:55 amQuote from Dave Voorhis on April 10, 2026, 7:11 pmQuote from dandl on April 10, 2026, 12:24 amThe 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.
?
Quote from Dave Voorhis on April 11, 2026, 4:37 pmQuote from dandl on April 11, 2026, 5:12 amJava 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.
Quote from dandl on April 11, 2026, 5:12 amJava 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.