Deutsch English Français Italiano |
<vdh2l1$2p7e2$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Pancho <Pancho.Jones@proton.me> Newsgroups: alt.folklore.computers,comp.os.linux.misc Subject: Re: TeX and Pascal [was Re: The joy of FORTRAN] Date: Tue, 1 Oct 2024 15:57:36 +0100 Organization: A noiseless patient Spider Lines: 56 Message-ID: <vdh2l1$2p7e2$1@dont-email.me> References: <pan$96411$d204da43$cc34bb91$1fe98651@linux.rocks> <5mqdnZuGq4lgwm_7nZ2dnZfqnPSdnZ2d@earthlink.com> <vcub5c$36h63$1@dont-email.me> <1r0e6u9.1tubjrt1kapeluN%snipeco.2@gmail.com> <vcuib9$37rge$5@dont-email.me> <vcvuhh$3hroa$2@dont-email.me> <llhieuF8ej2U2@mid.individual.net> <20240925083451.00003205@gmail.com> <Pascal-20240925164718@ram.dialup.fu-berlin.de> <mdd4j63pmo1.fsf_-_@panix5.panix.com> <oJ-cnQSrLZDYdGX7nZ2dnZfqnPWdnZ2d@earthlink.com> <vdatb6$1l4ch$8@dont-email.me> <vdauah$1lq1u$1@dont-email.me> <lltt6uF4fseU4@mid.individual.net> <vdcn1q$1tmdr$5@dont-email.me> <vddqoe$264fi$2@dont-email.me> <vdf4le$2cn51$6@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 01 Oct 2024 16:57:38 +0200 (CEST) Injection-Info: dont-email.me; posting-host="6abaabc5ca3d6421ac8c8ceaebcb4c98"; logging-data="2923970"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nmeX7Yr34BPHso/yeDpDryNiaTpaHRZ0=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:vKU839c3lbk9ZtNlWVf6s4dICgs= In-Reply-To: <vdf4le$2cn51$6@dont-email.me> Content-Language: en-GB Bytes: 4049 On 9/30/24 22:19, Lawrence D'Oliveiro wrote: > On Mon, 30 Sep 2024 10:24:30 +0100, Pancho wrote: > >> On 9/30/24 00:15, Lawrence D'Oliveiro wrote: >>> >>> C3 linearization >> >> Never heard of that before. It sounds far to difficult to understand in >> practice. > > 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. Single inheritance bewilders and confuses people, that is why we have rules for good practice to favour composition over inheritance, to avoid obscuring what the code does. The idea being to avoid deep hierarchies. 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. > > 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. I was generally happier to do a bit of extra code, reimplementing a conflicted interface than I would be having to understand a clever linearization (total ordering). However I never developed libraries and so so these concepts may be less important for me. There may be pathological cases where it is sensible. > Once you read the description, you realize it’s the only right way to > do things, and you wonder why everybody wasn’t already doing it this > way. > > Here is the paper: “A Monotonic Superclass Linearization for Dylan” > <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.19.3910&rep=rep1&type=pdf> 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. If there is a significant difference that requires new terms such as monotonic. And, ... that is all hugely easier than considering if this might be a good thing to do in code. Above my pay grade.