Liste des Groupes | Revenir à cl c |
On Fri, 22 Nov 2024 00:04:32 -0000 (UTC)if yopu pity for 5-10 hours being unproductive tell you boss something is wrong with him.. maybe start be pity after reading for 2 weeks or month (where you more soob be bored by this reading) but not 10 hours
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Thu, 21 Nov 2024 07:06:43 +0100, Janis Papanagnou wrote:By chance, few days ago I was writing a small GUI panel to present a
>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.
>
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.
>
status from the hardware board we just finished building. In C#,
because despite me knowing C++ (at least "old" C++) 10 times better
than I know C#, building simple GUI in C# still takes me less time and
the result tends to look better. It was the first time I was doing UDP
in .Net and going through docs I encountered UdpClient.ReceiveAsync
method. Got excited thinking that's exactly what I need to wait for
response from my board while still keeping GUI responsive. But it was
not obvious what exactly this async/await business is about.
Read several articles, including one quite long.
https://devblogs.microsoft.com/dotnet/how-async-await-really-works
More I read, less I understood how it helps me and what's the point.
In particular, handling timeout scenario looked especially ugly.
5-10 hours of reading were 5-12 hours wasted most unproductively.
At the end, just did it good old way by ThreadPool.QueueUserWorkItem()
with everything done synchronously by separate thread. Took me, may be,
two hours, including wrapping my head around Control.BeginInvoke and
Control.Invoke.
So much for innovations.
Yes, Simula pioneered OO. But the concept has gone in differentWhat I read seems to suggest that Smalltalk had bigger influence on
directions since then. For example, multiple inheritance, metaclasses
and classes as objects -- all things that Python supports.
modern twists of OOP. But then, may be Simula influenced Smalltalk?
Anyway, I don't like OOP very much, esp. so the version of it that was
pushed down our throats in late 80s and early 90s.
Les messages affichés proviennent d'usenet.