Re: Multiple Inheritance [was Re: The joy of FORTRAN]

Liste des GroupesRevenir à ol misc 
Sujet : Re: Multiple Inheritance [was Re: The joy of FORTRAN]
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : alt.folklore.computers comp.os.linux.misc
Date : 01. Oct 2024, 23:47:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vdhqm7$2t1fi$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Pan/0.160 (Toresk; )
On Tue, 1 Oct 2024 15:57:36 +0100, Pancho wrote:

On 9/30/24 22:19, Lawrence D'Oliveiro wrote:
>
But it makes the difference between multiple inheritance that bewilders
and confuses people, and multiple inheritance which makes sense. It’s
what lets Python have multiple inheritance that makes sense.
 
There is a difference between a consistent implementation of multiple
inheritance and something that people actually understand when coding,
or maintaining code.
 
In essence just because you can do something clever, doesn't mean you
should.

A clever idea worth using is one that saves programmer work and
implementation overhead.

For example, consider enumerated types. Java and C++ have to define these
as part of the core language. But Python does not: enums are provided by a
standard library module, written in pure Python -- there is nothing it
does that you cannot do in your own Python code.

This enum implementation is built on two important ideas from the core
language -- multiple inheritance, and metaclasses -- in order to do its
thing. As a result, it can do everything that Java enums can do, for
example, and more besides. And the result is very easy to use: you don’t
need to understand all the intricacies of the mechanisms concerned to
define simple enums.

(Want examples? Just ask.)

Think about why languages like Java and PHP avoided multiple
inheritance, and substituted those lame “interfaces” instead: it was to
avoid this bewilderment and confusion that is known to plague C++,
because the right solution wasn’t known at the time.
 
I quite like interfaces, polymorphism through interfaces.

“Interfaces” are just “abstract base classes lite”. They are a way to
provide a very limited form of multiple inheritance, in the hope that this
would somehow avoid the bewilderment that comes from multiple inheritance
as done in C++.

Do they succeed? You yourself said “Single inheritance bewilders and
confuses people”, so I don’t think they did.

I had a look, it would take me a while to work through the algorithm,
establish how the ideas sit in the more common language of DAGs and
graph theory.

The gist of it is, the linearization algorithm from CLOS was refined a bit
for Dylan. And C3 is in turn a refinement of the linearization used in
Dylan.

If there is a significant difference that requires new
terms such as monotonic.

“Monotonic” was not a new term in OO at the time of publication of that
paper. In fact, the concept exposed some of the deficiencies that C3
sought to address.

Date Sujet#  Auteur
21 Sep 24 * Can't Avoid That Shit Rust - Even On Gentoo567Farley Flud
21 Sep 24 +- Re: Can't Avoid That Shit Rust - Even On Gentoo1Farley Flud
24 Sep 24 `* Re: Can't Avoid That Shit Rust - Even On Gentoo565186282@ud0s4.net
24 Sep 24  +* Re: Can't Avoid That Shit Rust - Even On Gentoo6Lawrence D'Oliveiro
24 Sep 24  i+* Re: Can't Avoid That Shit Rust - Even On Gentoo2Pancho
25 Sep 24  ii`- Re: Can't Avoid That Shit Rust - Even On Gentoo1186282@ud0s4.net
25 Sep 24  i`* Re: Can't Avoid That Shit Rust - Even On Gentoo3186282@ud0s4.net
25 Sep 24  i +- Re: Can't Avoid That Shit Rust - Even On Gentoo1Lawrence D'Oliveiro
25 Sep 24  i `- Re: Can't Avoid That Shit Rust - Even On Gentoo1rbowman
24 Sep 24  +* Re: Can't Avoid That Shit Rust - Even On Gentoo4D
25 Sep 24  i`* Re: Can't Avoid That Shit Rust - Even On Gentoo3186282@ud0s4.net
25 Sep 24  i `* Re: Can't Avoid That Shit Rust - Even On Gentoo2Lawrence D'Oliveiro
28 Sep 24  i  `- Re: Can't Avoid That Shit Rust - Even On Gentoo1186282@ud0s4.net
24 Sep 24  +* The joy of FORTRAN508Lars Poulsen
24 Sep 24  i+* Re: The joy of FORTRAN256Sn!pe
24 Sep 24  ii+* Re: The joy of FORTRAN160The Natural Philosopher
24 Sep 24  iii+* Re: The joy of FORTRAN34Lawrence D'Oliveiro
25 Sep 24  iiii+* Re: The joy of FORTRAN22rbowman
25 Sep 24  iiiii+* Re: The joy of FORTRAN19Bob Eager
25 Sep 24  iiiiii+* Re: The joy of FORTRAN16rbowman
25 Sep 24  iiiiiii+* Re: The joy of FORTRAN13Bob Eager
27 Sep 24  iiiiiiii`* Re: The joy of FORTRAN12Peter Flass
27 Sep 24  iiiiiiii +- Re: The joy of FORTRAN1Niklas Karlsson
27 Sep 24  iiiiiiii +* Re: The joy of FORTRAN6R Daneel Olivaw
28 Sep 24  iiiiiiii i+* Re: The joy of FORTRAN3Gordon Henderson
28 Sep 24  iiiiiiii ii+- Re: The joy of FORTRAN1Peter Flass
28 Sep 24  iiiiiiii ii`- Re: The joy of FORTRAN1Bob Eager
28 Sep 24  iiiiiiii i+- Re: The joy of FORTRAN1Peter Flass
28 Sep 24  iiiiiiii i`- Re: The joy of FORTRAN1Lars Poulsen
27 Sep 24  iiiiiiii +- Re: The joy of FORTRAN1Bob Eager
28 Sep 24  iiiiiiii `* Re: The joy of FORTRAN3Lawrence D'Oliveiro
28 Sep 24  iiiiiiii  +- Re: The joy of FORTRAN1Peter Flass
30 Sep22:26  iiiiiiii  `- Re: The joy of FORTRAN1Rich Alderson
25 Sep 24  iiiiiii`* Re: The joy of FORTRAN2Lynn Wheeler
25 Sep 24  iiiiiii `- Re: The joy of FORTRAN1Kerr-Mudd, John
25 Sep 24  iiiiii`* Re: The joy of FORTRAN2Chris Ahlstrom
25 Sep 24  iiiiii `- Re: The joy of FORTRAN1Bob Eager
27 Sep 24  iiiii`* Re: The joy of FORTRAN2Peter Flass
27 Sep 24  iiiii `- Re: The joy of FORTRAN1moi
25 Sep 24  iiii+* Re: The joy of FORTRAN2Lynn Wheeler
25 Sep 24  iiiii`- Re: The joy of FORTRAN1Lawrence D'Oliveiro
25 Sep 24  iiii+* Re: The joy of FORTRAN2Chris Ahlstrom
27 Sep 24  iiiii`- Re: The joy of FORTRAN1Peter Flass
25 Sep 24  iiii+- Re: The joy of FORTRAN1Chris Ahlstrom
25 Sep 24  iiii+- Re: The joy of FORTRAN1Kerr-Mudd, John
27 Sep 24  iiii+* Re: The joy of FORTRAN2Peter Flass
27 Sep 24  iiiii`- Re: The joy of FORTRAN1Dennis Boone
27 Sep 24  iiii`* Re: The joy of FORTRAN3Andy Walker
28 Sep 24  iiii +- Re: The joy of FORTRAN1Lawrence D'Oliveiro
28 Sep 24  iiii `- Re: The joy of FORTRAN1Peter Flass
25 Sep 24  iii+* Re: The joy of FORTRAN2Peter Flass
25 Sep 24  iiii`- Re: The joy of FORTRAN1Lawrence D'Oliveiro
25 Sep 24  iii+- Re: The joy of FORTRAN1Peter Flass
25 Sep 24  iii+- Re: The joy of FORTRAN1Peter Flass
25 Sep 24  iii+- Re: The joy of FORTRAN1rbowman
25 Sep 24  iii+* Re: The joy of FORTRAN116Woozy Song
25 Sep 24  iiii`* Re: The joy of FORTRAN115rbowman
25 Sep 24  iiii +* Re: The joy of FORTRAN3Lawrence D'Oliveiro
27 Sep 24  iiii i`* Re: The joy of FORTRAN2Peter Flass
30 Sep12:58  iiii i `- Re: The joy of FORTRAN1Waldek Hebisch
25 Sep 24  iiii +* Re: The joy of FORTRAN37Chris Ahlstrom
25 Sep 24  iiii i+* Re: The joy of FORTRAN3R Daneel Olivaw
25 Sep 24  iiii ii`* Re: The joy of FORTRAN2Kerr-Mudd, John
25 Sep 24  iiii ii `- Re: The joy of FORTRAN1R Daneel Olivaw
25 Sep 24  iiii i+* Re: The joy of FORTRAN6Lynn Wheeler
26 Sep 24  iiii ii+- Re: The joy of FORTRAN1Pancho
26 Sep 24  iiii ii`* Re: The joy of FORTRAN4Lynn Wheeler
26 Sep 24  iiii ii `* Re: The joy of FORTRAN3Lawrence D'Oliveiro
27 Sep 24  iiii ii  `* Re: The joy of FORTRAN2rbowman
27 Sep 24  iiii ii   `- Re: The joy of FORTRAN1Lawrence D'Oliveiro
26 Sep 24  iiii i+* Re: The joy of FORTRAN3rbowman
26 Sep 24  iiii ii+- Re: The joy of FORTRAN1John Ames
26 Sep 24  iiii ii`- Re: The joy of FORTRAN1Lawrence D'Oliveiro
26 Sep 24  iiii i+* Re: The joy of FORTRAN19Pancho
26 Sep 24  iiii ii+* Re: The joy of FORTRAN16Lawrence D'Oliveiro
26 Sep 24  iiii iii`* Re: The joy of FORTRAN15Pancho
26 Sep 24  iiii iii `* Re: The joy of FORTRAN14Lawrence D'Oliveiro
27 Sep 24  iiii iii  `* Re: The joy of FORTRAN13Lars Poulsen
27 Sep 24  iiii iii   +* Re: The joy of FORTRAN7Lawrence D'Oliveiro
27 Sep 24  iiii iii   i`* Re: The joy of FORTRAN6Pancho
28 Sep 24  iiii iii   i `* Re: The joy of VAX5Lawrence D'Oliveiro
28 Sep 24  iiii iii   i  `* Re: The joy of VAX4Pancho
29 Sep09:35  iiii iii   i   `* Re: The joy of VAX3Robert Marshall
29 Sep09:56  iiii iii   i    +- Re: The joy of VAX1Bob Eager
29 Sep22:15  iiii iii   i    `- Re: The joy of VAX1Peter Flass
28 Sep 24  iiii iii   `* The joy of VAX C5Lars Poulsen
28 Sep 24  iiii iii    +- Re: The joy of VAX C1The Natural Philosopher
29 Sep 24  iiii iii    +- Re: The joy of VAX C1rbowman
29 Sep22:15  iiii iii    `* Re: The joy of VAX C2Peter Flass
30 Sep01:10  iiii iii     `- Re: The joy of VAX C1Lawrence D'Oliveiro
27 Sep 24  iiii ii`* Re: The joy of FORTRAN2Peter Flass
27 Sep 24  iiii ii `- Re: The joy of FORTRAN1Lawrence D'Oliveiro
27 Sep 24  iiii i`* Re: The joy of FORTRAN5Peter Flass
27 Sep 24  iiii i +* Re: The joy of FORTRAN2Bob Eager
28 Sep 24  iiii i i`- Re: The joy of FORTRAN1Peter Flass
27 Sep 24  iiii i `* Re: The joy of FORTRAN2Lynn Wheeler
27 Sep 24  iiii i  `- Re: The joy of FORTRAN1Lynn Wheeler
25 Sep 24  iiii `* Re: The joy of FORTRAN74John Ames
25 Sep 24  iiii  +* Re: The joy of FORTRAN69Stefan Ram
25 Sep 24  iiii  i+* Re: The joy of FORTRAN2John Ames
25 Sep 24  iiii  ii`- Re: The joy of FORTRAN1Lawrence D'Oliveiro
25 Sep 24  iiii  i+* TeX and Pascal [was Re: The joy of FORTRAN]65Rich Alderson
25 Sep 24  iiii  i`- Re: The joy of FORTRAN1Lawrence D'Oliveiro
25 Sep 24  iiii  `* Re: The joy of FORTRAN4Lawrence D'Oliveiro
25 Sep 24  iii`* Re: The joy of FORTRAN4John Levine
24 Sep 24  ii+* Re: The joy of FORTRAN91rbowman
24 Sep 24  ii+* Re: The joy of FORTRAN2Lawrence D'Oliveiro
25 Sep 24  ii`* Re: The joy of FORTRAN2Bob Eager
24 Sep 24  i+* Re: The joy of FORTRAN5Bob Eager
24 Sep 24  i+- Re: The joy of FORTRAN1R Daneel Olivaw
25 Sep 24  i+- Re: The joy of FORTRAN1Peter Flass
25 Sep 24  i`* Re: The joy of FORTRAN244186282@ud0s4.net
24 Sep 24  +* Re: Can't Avoid That Shit Rust - Even On Gentoo3rek2 hispagatos
24 Sep 24  +* Re: Can't Avoid That Shit Rust - Even On Gentoo2rbowman
24 Sep 24  +- Re: Can't Avoid That Shit Rust - Even On Gentoo1The Natural Philosopher
25 Sep 24  `* Re: Can't Avoid That Shit Rust - Even On Gentoo40rbowman

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal