Re: Joy of this, Joy of that

Liste des GroupesRevenir à col misc 
Sujet : Re: Joy of this, Joy of that
De : Pancho.Jones (at) *nospam* proton.me (Pancho)
Groupes : comp.os.linux.misc
Date : 24. Nov 2024, 22:19:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vi059n$2cuig$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Mozilla Thunderbird
On 11/24/24 00:31, Lawrence D'Oliveiro wrote:
On Sat, 23 Nov 2024 23:48:59 +0000, Pancho wrote:
 
To be honest, I don't have an idea what classes not being the
implementers of instance behaviour means. Where is instance behaviour
implemented?
  From further up: “A behavior is the set of methods used by an object to
respond to messages”. Since a class itself has no such “behavior”, it
doesn’t need to be an instance of anything, unlike Python.
 
What?, Classes do have methods, e.g. they should handle a "new" message to create a new instance object of that class.
In my previous post I didn't understand the meaning of implementation. Informally I think of implementation as my code, my definition of a function, as opposed to declaration. For instance I might say  a class implements an interface. However I think the article you cited was using the word implementation to mean compiler. i.e. implementation of the Smalltalk language.
 From my perspective this is irrelevant, because my understanding of Smalltalk was conceptual. The Smalltalk-80 Bluebook spoke of classes as normal objects which had methods, responded to messages. The class which created instance objects of type class was a metaclass.
The fact that a compiler/interpreter might handle (implementation detail) all class behaviour, as it does in C++, doesn't matter. It is helpful to think of classes as objects in their own right.
The problem is that the OO model for C++ is more complex. It is easy to not be able to see the wood for the tress. That is why I was lucky to have the Smalltalk conceptual model before being introduced to C++,

I would say C++ static methods and static variables are a hack.
>
They are there to provide access to the innards of a private/protected
class,
>
No, C++ static means class method or class variable.
 There are no “class methods” or “class variables” as such in C++: in C
terms, they have “static linkage”. The “class” part is just a visibility
restriction.
 
static has many usages in C++. You seem to be confusing the C definition of a static variable with internal linkage, with the idea of a C++ class static member variable or method.

Just as value types are a hack in C#. Things that are sensible for
performance reasons, but that add complexity.
>
Presumably, like Java, these mechanisms are there to avoid the need for
the services of the full language compiler at runtime.
>
No they are there for performance, because you don't want to have to do
a malloc and instance initialisation for every number you use.
 Ah, like the distinction between “primitive types” and “reference types”
in Java.
 
Possibly. Reference types are like pointers. Value types can live only on the stack.

Python manages to avoid this arbitrary separation: “int”, “float”, “str”,
“dict” etc are builtin types, and they are classes almost exactly like
classes you define yourself; and in particular you can subclass them.
 
In practice I didn't care. Generics solved the main problem of using value types in container classes, without having to box them.

Python also does multiple inheritance. And it does it quite nicely,
benefiting from lessons learned in earlier attempts at “linearization”
(coming up with a consistent and minimally-surprising method resolution
order across all the base classes).
>
Yeah, we discussed this in the past. I'm totally unconvinced of the
desirability of complex multiple inheritance linearization.
 It is useful, for example, for creating enumerations of fixed instances of
some particular base class. You inherit from both your particular base
class as well as the generic “enum.Enum” base class, to get suitable
properties of both.
 
Like an interface, IEnumerable (Chsarp), Iterable(Java)? or are you back to some special use for Enums.

I'm actually quite unconvinced by Python.
 Python manages to provide a small, powerful language core that includes
features that, for example, Java and C♯ had to leave out: lexical binding,
functions and classes as first-class objects, operator overloads,
arbitrary-precision integers, list comprehensions, dictionary and set
expressions, descriptors, metaclasses ... this then allows for library
modules to build on this core to provide powerful facilities in the form
of “domain-specific (sub)languages” (DSLs) that are specialized to
particular problem areas.
 
Python is very pretty, the problem is that I tried to write some programs using it and the libraries were buggy. With CSharp and Java the standardish libraries seem more reliable.

For example, you don’t need “generics” or “templates”, à la Java/C++ etc,
because you can define a “class factory” function that constructs new
classes at runtime.
Yeah, I find not having explicit types very difficult to handle. Maybe that is prejudice, maybe not.

Date Sujet#  Auteur
19 Nov 24 * Joy of this, Joy of that806root
20 Nov 24 +* Re: Joy of this, Joy of that4Lawrence D'Oliveiro
20 Nov 24 i`* Re: Joy of this, Joy of that3root
20 Nov 24 i +- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
20 Nov 24 i `- Re: Joy of this, Joy of that1rbowman
20 Nov 24 `* Re: Joy of this, Joy of that801186282@ud0s4.net
20 Nov 24  +* Re: Joy of this, Joy of that193Rich
20 Nov 24  i+- Re: Joy of this, Joy of that1The Natural Philosopher
21 Nov 24  i`* Re: Joy of this, Joy of that191186282@ud0s4.net
21 Nov 24  i +* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
14 Jan 25  i i`- Re: Joy of this, Joy of that1Bozo User
21 Nov 24  i +* Re: Joy of this, Joy of that187The Natural Philosopher
22 Nov 24  i i`* Re: Joy of this, Joy of that186Don_from_AZ
22 Nov 24  i i `* Re: Joy of this, Joy of that185Lawrence D'Oliveiro
23 Nov 24  i i  `* Re: Joy of this, Joy of that184186282@ud0s4.net
23 Nov 24  i i   +* Re: Joy of this, Joy of that5Lawrence D'Oliveiro
24 Nov 24  i i   i`* Re: Joy of this, Joy of that4186282@ud0s4.net
24 Nov 24  i i   i +* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
24 Nov 24  i i   i i`- Re: Joy of this, Joy of that1186282@ud0s4.net
24 Nov 24  i i   i `- Re: Joy of this, Joy of that1rbowman
23 Nov 24  i i   `* Re: Joy of this, Joy of that178The Natural Philosopher
23 Nov 24  i i    +- Re: Joy of this, Joy of that1rbowman
23 Nov 24  i i    +- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
24 Nov 24  i i    +* Re: Joy of this, Joy of that174186282@ud0s4.net
24 Nov 24  i i    i+- Re: Joy of this, Joy of that1rbowman
24 Nov 24  i i    i`* Re: Joy of this, Joy of that172Rich
24 Nov 24  i i    i +* Re: Joy of this, Joy of that168The Natural Philosopher
24 Nov 24  i i    i i+* Re: Joy of this, Joy of that159Rich
24 Nov 24  i i    i ii`* Re: Joy of this, Joy of that158D
25 Nov 24  i i    i ii `* Re: Joy of this, Joy of that157rbowman
25 Nov 24  i i    i ii  `* Re: Joy of this, Joy of that156D
25 Nov 24  i i    i ii   `* Re: Joy of this, Joy of that155The Natural Philosopher
25 Nov 24  i i    i ii    +* Re: Joy of this, Joy of that15D
26 Nov 24  i i    i ii    i`* Re: Joy of this, Joy of that14rbowman
26 Nov 24  i i    i ii    i +- Re: Joy of this, Joy of that1D
26 Nov 24  i i    i ii    i `* Re: Joy of this, Joy of that12Pancho
26 Nov 24  i i    i ii    i  `* Re: Joy of this, Joy of that11Rich
26 Nov 24  i i    i ii    i   +* Re: Joy of this, Joy of that2Chris Ahlstrom
27 Nov 24  i i    i ii    i   i`- Re: Joy of this, Joy of that1Pancho
26 Nov 24  i i    i ii    i   `* Re: Joy of this, Joy of that8rbowman
26 Nov 24  i i    i ii    i    +* Re: Joy of this, Joy of that4D
27 Nov 24  i i    i ii    i    i+- Re: Joy of this, Joy of that1Rich
27 Nov 24  i i    i ii    i    i`* Re: Joy of this, Joy of that2rbowman
27 Nov 24  i i    i ii    i    i `- Re: Joy of this, Joy of that1D
27 Nov 24  i i    i ii    i    `* Re: Joy of this, Joy of that3The Natural Philosopher
27 Nov 24  i i    i ii    i     `* Re: Joy of this, Joy of that2rbowman
28 Nov 24  i i    i ii    i      `- Re: Joy of this, Joy of that1The Natural Philosopher
25 Nov 24  i i    i ii    `* Re: Joy of this, Joy of that139Lawrence D'Oliveiro
27 Nov 24  i i    i ii     `* Re: Joy of this, Joy of that138186282@ud0s4.net
27 Nov 24  i i    i ii      `* Re: Joy of this, Joy of that137Lawrence D'Oliveiro
28 Nov 24  i i    i ii       `* Re: Joy of this, Joy of that136186282@ud0s4.net
28 Nov 24  i i    i ii        +* Re: Joy of this, Joy of that133rbowman
28 Nov 24  i i    i ii        i`* Re: Joy of this, Joy of that132186282@ud0s4.net
28 Nov 24  i i    i ii        i +* Re: Joy of this, Joy of that3rbowman
29 Nov 24  i i    i ii        i i`* Re: Joy of this, Joy of that2186282@ud0s4.net
29 Nov 24  i i    i ii        i i `- Re: Joy of this, Joy of that1rbowman
28 Nov 24  i i    i ii        i `* Re: Joy of this, Joy of that128Lawrence D'Oliveiro
29 Nov 24  i i    i ii        i  `* Re: Joy of this, Joy of that127186282@ud0s4.net
29 Nov 24  i i    i ii        i   +* Re: Joy of this, Joy of that116rbowman
30 Nov 24  i i    i ii        i   i`* Re: Joy of this, Joy of that115186282@ud0s4.net
30 Nov 24  i i    i ii        i   i +- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
30 Nov 24  i i    i ii        i   i `* Re: Joy of this, Joy of that113rbowman
30 Nov 24  i i    i ii        i   i  +* Re: Joy of this, Joy of that2The Natural Philosopher
1 Dec 24  i i    i ii        i   i  i`- Re: Joy of this, Joy of that1Lawrence D'Oliveiro
1 Dec 24  i i    i ii        i   i  `* Re: Joy of this, Joy of that110186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   +* Re: Joy of this, Joy of that5The Natural Philosopher
1 Dec 24  i i    i ii        i   i   i+* Re: Joy of this, Joy of that2Rich
3 Dec 24  i i    i ii        i   i   ii`- Re: Joy of this, Joy of that1186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   i+- Re: Joy of this, Joy of that1D
2 Dec 24  i i    i ii        i   i   i`- Re: Joy of this, Joy of that1186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   +* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
3 Dec 24  i i    i ii        i   i   i`- Re: Joy of this, Joy of that1186282@ud0s4.net
1 Dec 24  i i    i ii        i   i   `* Re: Joy of this, Joy of that102rbowman
3 Dec 24  i i    i ii        i   i    `* Re: Joy of this, Joy of that101186282@ud0s4.net
3 Dec 24  i i    i ii        i   i     +* Re: Joy of this, Joy of that2The Natural Philosopher
3 Dec 24  i i    i ii        i   i     i`- Re: Joy of this, Joy of that1rbowman
3 Dec 24  i i    i ii        i   i     `* Re: Joy of this, Joy of that98rbowman
5 Dec 24  i i    i ii        i   i      `* Re: Joy of this, Joy of that97186282@ud0s4.net
5 Dec 24  i i    i ii        i   i       +* Re: Joy of this, Joy of that92D
6 Dec 24  i i    i ii        i   i       i`* Re: Joy of this, Joy of that91186282@ud0s4.net
6 Dec 24  i i    i ii        i   i       i +* Re: Joy of this, Joy of that37rbowman
6 Dec 24  i i    i ii        i   i       i i+* Re: Joy of this, Joy of that34D
7 Dec 24  i i    i ii        i   i       i ii+* Re: Joy of this, Joy of that2186282@ud0s4.net
7 Dec 24  i i    i ii        i   i       i iii`- Re: Joy of this, Joy of that1D
7 Dec 24  i i    i ii        i   i       i ii+* Re: Joy of this, Joy of that17186282@ud0s4.net
7 Dec 24  i i    i ii        i   i       i iii`* Re: Joy of this, Joy of that16D
7 Dec 24  i i    i ii        i   i       i iii +* Re: Joy of this, Joy of that14Rich
7 Dec 24  i i    i ii        i   i       i iii i`* Re: Joy of this, Joy of that13D
7 Dec 24  i i    i ii        i   i       i iii i `* Re: Joy of this, Joy of that12Rich
7 Dec 24  i i    i ii        i   i       i iii i  +* Re: Joy of this, Joy of that10D
8 Dec 24  i i    i ii        i   i       i iii i  i+* Re: Joy of this, Joy of that7Rich
8 Dec 24  i i    i ii        i   i       i iii i  ii+* Re: Joy of this, Joy of that5rbowman
8 Dec 24  i i    i ii        i   i       i iii i  iii`* Re: Joy of this, Joy of that4Rich
8 Dec 24  i i    i ii        i   i       i iii i  iii +* Re: Joy of this, Joy of that2The Natural Philosopher
9 Dec 24  i i    i ii        i   i       i iii i  iii i`- Re: Joy of this, Joy of that1The Natural Philosopher
8 Dec 24  i i    i ii        i   i       i iii i  iii `- Re: Joy of this, Joy of that1rbowman
8 Dec 24  i i    i ii        i   i       i iii i  ii`- Re: Joy of this, Joy of that1D
8 Dec 24  i i    i ii        i   i       i iii i  i`* Re: Joy of this, Joy of that2Robert Riches
8 Dec 24  i i    i ii        i   i       i iii i  i `- Re: Joy of this, Joy of that1D
7 Dec 24  i i    i ii        i   i       i iii i  `- Re: Joy of this, Joy of that1D
8 Dec 24  i i    i ii        i   i       i iii `- Re: Joy of this, Joy of that1186282@ud0s4.net
7 Dec 24  i i    i ii        i   i       i ii`* Re: Joy of this, Joy of that14D
7 Dec 24  i i    i ii        i   i       i i`* Re: Joy of this, Joy of that2186282@ud0s4.net
6 Dec 24  i i    i ii        i   i       i `* Re: Joy of this, Joy of that53D
5 Dec 24  i i    i ii        i   i       `* Re: Joy of this, Joy of that4Lawrence D'Oliveiro
29 Nov 24  i i    i ii        i   `* Re: Joy of this, Joy of that10Lawrence D'Oliveiro
28 Nov 24  i i    i ii        `* Re: Joy of this, Joy of that2Lawrence D'Oliveiro
25 Nov 24  i i    i i`* Re: Joy of this, Joy of that8vallor
24 Nov 24  i i    i `* Re: Joy of this, Joy of that3D
24 Nov 24  i i    `- Re: Joy of this, Joy of that1Rich
21 Nov 24  i `- Re: Joy of this, Joy of that1Rich
20 Nov 24  +* Re: Joy of this, Joy of that606John Ames
20 Nov 24  `- Re: Joy of this, Joy of that1rbowman

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal