Deutsch English Français Italiano |
<vdn3n1$3ssv4$4@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: alt.folklore.computers,comp.os.linux.misc Subject: Re: Multiple Inheritance [was Re: The joy of FORTRAN] Date: Thu, 3 Oct 2024 21:52:34 -0000 (UTC) Organization: A noiseless patient Spider Lines: 32 Message-ID: <vdn3n1$3ssv4$4@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> <vdh2l1$2p7e2$1@dont-email.me> <vdhqm7$2t1fi$3@dont-email.me> <vdlirb$3kuh8$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 03 Oct 2024 23:52:34 +0200 (CEST) Injection-Info: dont-email.me; posting-host="319a655577b0d958d85bd19ad5bdfbec"; logging-data="4092900"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18y4RqPTjxjEz6VYcpcseoX" User-Agent: Pan/0.160 (Toresk; ) Cancel-Lock: sha1:Y8h5XxhuJD3RsLvnPSxkK5uUH/Y= Bytes: 3182 On Thu, 3 Oct 2024 08:58:35 +0100, Pancho wrote: > Deep down, I don't really care about enums. They are nice to have, > intellisense mainly, but I don't want to spend time thinking about them. Ah, I wondered. So you depend on your IDE’s autocomplete to do at least some of your thinking for you? That might explain your attitude to coding. Enums have a great many uses. You know about bit masks? I use enums here <https://gitlab.com/ldo/inotipy> to give them symbolic names (easier for the user to understand) that can be used in a set that encodes to the mask (because that’s what the underlying C API expects), and conversely the enum provides a classmethod that can decode the low-level mask back to a set of symbolic names, for easier display for debugging. It’s all about using the language tools available to make things easier for yourself. >> “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++. >> > "Pure virtual classes" rather than abstract. Only C++ uses the term “virtual” in that sense. Proper OO languages don’t. > There is a trade off between a software language being simple, and being > able to neatly solve all problems. Some languages manage to be simpler, and yet more powerful, than others. Compare Python to Java or C++, for example.