From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Generators/coroutines in future Ada?
Date: Wed, 12 Jul 2017 00:35:16 -0500
Date: 2017-07-12T00:35:16-05:00 [thread overview]
Message-ID: <ok4cel$ph$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: ok3meg$fg6$1@gioia.aioe.org
"Victor Porton" <porton@narod.ru> wrote in message
news:ok3meg$fg6$1@gioia.aioe.org...
> Dmitry A. Kazakov wrote:
>
....
>>> A task is a perfect abstraction for a thread of control that maintains
>>> its own execution state!
>>
>> Except that no control is required.
>>
>> I don't understand what is wrong with:
>>
>> type Stateful is limited private;
>> function Generate (X : not null access Stateful) return Things;
>
> The thing "wrong" with this, is that it is sometimes hard to implement
> Generate(). In Python this can be done in an easier way by using
> generators
> (Python's "yield" keywords).
The thing "wrong" with this is that it forces sequential execution. A Python
generator is by its nature a serial bottleneck (indeed, when this was
discussed on the ARG list, that was suggested as an advantage!!! of the
Python approach).
The coming problem with "classic" programming languages like Ada is that
they don't map well to architectures with a lot of parallelism. The more
constructs that require sequential execution, the worse that Ada programs
will perform. With that in mind, it is hard to imagine why anyone would want
to invest the hundreds or even thousands of hours required for a new
language version on still more sequential constructs. Especially constructs
that by their nature require sequential execution.
Randy.
next prev parent reply other threads:[~2017-07-12 5:35 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 20:19 Generators/coroutines in future Ada? Victor Porton
2017-07-09 21:28 ` Dennis Lee Bieber
2017-07-09 23:56 ` Victor Porton
2017-07-10 7:33 ` Dmitry A. Kazakov
2017-07-10 13:38 ` Victor Porton
2017-07-10 17:01 ` Paul Rubin
2017-07-10 21:24 ` Victor Porton
2017-07-12 17:09 ` Paul Rubin
2017-07-12 17:39 ` Victor Porton
2017-07-13 6:35 ` Paul Rubin
2017-07-11 9:42 ` J-P. Rosen
2017-07-11 12:52 ` Victor Porton
2017-07-11 13:01 ` Victor Porton
2017-07-11 13:26 ` J-P. Rosen
2017-07-11 16:04 ` Dennis Lee Bieber
2017-07-11 16:59 ` Dmitry A. Kazakov
2017-07-11 19:52 ` Pascal Obry
2017-07-11 20:18 ` Dmitry A. Kazakov
2017-07-11 18:36 ` Victor Porton
2017-07-11 19:22 ` J-P. Rosen
2017-07-11 20:25 ` Dmitry A. Kazakov
2017-07-11 23:19 ` Victor Porton
2017-07-12 4:54 ` J-P. Rosen
2017-07-12 13:07 ` Victor Porton
2017-07-12 13:38 ` Dmitry A. Kazakov
2017-07-12 5:35 ` Randy Brukardt [this message]
2017-07-12 7:27 ` Dmitry A. Kazakov
2017-07-12 22:47 ` Shark8
2017-07-16 13:11 ` Robert Eachus
2017-07-17 23:54 ` Randy Brukardt
2017-07-18 7:38 ` Dmitry A. Kazakov
2017-07-12 7:19 ` Dmitry A. Kazakov
2017-07-12 6:35 ` G.B.
2017-07-12 7:34 ` Dmitry A. Kazakov
2017-07-12 20:49 ` G.B.
2017-07-13 8:18 ` Dmitry A. Kazakov
2017-07-12 17:34 ` Paul Rubin
2017-07-11 19:27 ` Simon Wright
2017-07-12 5:42 ` darkestkhan
2017-07-12 8:57 ` Maciej Sobczak
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox