Re: logically weird loop

Liste des GroupesRevenir à cl c  
Sujet : Re: logically weird loop
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.c
Date : 22. Nov 2024, 06:09:35
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vhp3mg$122pu$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 22.11.2024 01:04, Lawrence D'Oliveiro wrote:
On Thu, 21 Nov 2024 07:06:43 +0100, Janis Papanagnou wrote:
 
Actually, if you know Simula, coroutines are inherent part of that
language, and they based their yet more advanced process-oriented model
on these. I find it amazing what Simula provided (in 1967!) to support
such things. Object orientation[*], coroutines, etc., all fit together,
powerful, and in a neat syntactical form.
 
Wirth did include coroutines in Modula-2. And a kind of object orientation
in Oberon, I think it was.
 
But these are (nowadays) called “stackful” coroutines -- because a control
transfer to another coroutine can happen at any routine call, each
coroutine context needs a full-sized stack, just like a thread.

Simula has also in objects own PCs (Program Counters) to enable each
object to be interrupted and resumed. Can't tell about Modula-2 and
Oberon, but I suppose they adopted quite some things from Simula, as
C++ and other languages adopted Simula concepts.

 
There is this newer concept of “stackless” coroutines -- not that they
have no stack, but they need less of it, since a control transfer to
another coroutine context can only happen at the point of an “await”
construct, and these are only allowed in coroutine functions, which are
declared “async”. I think Microsoft pioneered this in C♯, but it has since
been copied into JavaScript, Python and other languages.

Not surprising that good concepts were adopted in other languages,
and expanded by own ideas. Rather it surprised me that some basic
IMO necessities were not; e.g. that C++ had no garbage collection
but Simula (and other languages) already had it long ago.

 
Yes, Simula pioneered OO. But the concept has gone in different directions
since then. For example, multiple inheritance, metaclasses and classes as
objects -- all things that Python supports.

Of course evolution will influence development of future languages,
and they may deviate or may also take new directions. Individual
language design decisions were arguable, though; I recall disputes
concerning, e.g., multiple inheritance (which is not necessary but
significantly complicates an OO language) or that "everything must
be an object" to qualify as "real" OOL, and so on. I don't want to
start or continue these discussions here. Personally I found e.g.
C++'s multiple inheritance useful; that was a language I actually
used professionally. I also find it not very surprising if Python,
a quarter centenary after Simula, supports concepts (sensible or
not) that Simula didn't have. What I find impressive [in Simula]
is not only the new "OO" modeling concept but also how all their
software patterns fit together (the already mentioned coroutines,
or the prefix blocks; just for example to make clear what I mean).
As a pioneering language, as you rightly classify it, Simula had
no paragon for many things that it invented in an impressive way.

Janis


Date Sujet#  Auteur
20 Nov 24 * logically weird loop32fir
20 Nov 24 +- Re: logically weird loop1fir
20 Nov 24 `* Re: logically weird loop30Janis Papanagnou
20 Nov 24  +* Re: logically weird loop4fir
20 Nov 24  i`* Re: logically weird loop3fir
20 Nov 24  i `* Re: logically weird loop2fir
21 Nov 24  i  `- Re: logically weird loop1fir
21 Nov 24  `* Re: logically weird loop25Lawrence D'Oliveiro
21 Nov 24   +* Re: logically weird loop21Janis Papanagnou
21 Nov 24   i+* Re: logically weird loop6fir
21 Nov 24   ii`* Re: logically weird loop5fir
21 Nov 24   ii `* Re: logically weird loop4Janis Papanagnou
21 Nov 24   ii  `* Re: logically weird loop3fir
21 Nov 24   ii   `* Re: logically weird loop2Janis Papanagnou
22 Nov 24   ii    `- Re: logically weird loop1fir
22 Nov 24   i+* Re: logically weird loop9Lawrence D'Oliveiro
22 Nov 24   ii+- Re: logically weird loop1Janis Papanagnou
22 Nov 24   ii`* Re: logically weird loop7Michael S
22 Nov 24   ii +* Re: logically weird loop2fir
22 Nov 24   ii i`- Re: logically weird loop1fir
5 Dec 24   ii `* Re: logically weird loop4Tim Rentsch
5 Dec 24   ii  `* Re: logically weird loop3Janis Papanagnou
5 Dec 24   ii   `* Re: logically weird loop2David Brown
5 Dec 24   ii    `- Re: logically weird loop1Janis Papanagnou
5 Dec 24   i`* Re: logically weird loop5Tim Rentsch
5 Dec 24   i `* Re: logically weird loop4Janis Papanagnou
7 Dec 24   i  `* Re: logically weird loop3Tim Rentsch
7 Dec 24   i   `* Re: logically weird loop2Keith Thompson
8 Dec 24   i    `- Re: logically weird loop1Kaz Kylheku
22 Nov 24   `* Re: logically weird loop3fir
22 Nov 24    `* Re: logically weird loop2fir
24 Nov 24     `- Re: logically weird loop1fir

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal