From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Ada advocacy Date: Thu, 29 Aug 2013 16:47:04 +0200 Organization: Ada @ Home Message-ID: References: <19595886.4450.1332248078686.JavaMail.geo-discussion-forums@vbbfy7> <2012032020582259520-rblove@airmailnet> <12ee9bc5-3bdf-4ac0-b805-5f10b3859ff4@googlegroups.com> <6c58fae4-6c34-4d7a-ab71-e857e55897c0@x6g2000vbj.googlegroups.com> <246849b7-7a53-48a2-8f64-ff6dfb2086ce@googlegroups.com> <521dbbbb$0$9520$9b4e6d93@newsspool1.arcor-online.net> <1spiuuuxfwqq4$.46v46qs98684.dlg@40tude.net> <521de20d$0$9507$9b4e6d93@newsspool1.arcor-online.net> <1ko98ye6q8bzv.134llfoupp81w.dlg@40tude.net> NNTP-Posting-Host: jWA3lKxpaDd2fQFeoPpx8A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:17037 Date: 2013-08-29T16:47:04+02:00 List-Id: Le Wed, 28 Aug 2013 19:25:59 +0200, Dmitry A. Kazakov = a =C3=A9crit: > On Wed, 28 Aug 2013 18:44:38 +0200, Yannick Duch=C3=AAne (Hibou57) wro= te: > >> Le Wed, 28 Aug 2013 13:42:16 +0200, G.B. >> a =C3=A9crit: >>> >>> That's the deal, a reference to an order of events in time, >>> right in the type. Something that ordinary types don't have. >> >> As a comment aside, that's why it happened I missed Ada had coroutine= s >> (using a task in place of a coroutine is too much). > > It is an interesting question, but too vague. Thanks for the interesting questions :) > 1. preemptive or not? No. Otherwise just use task. > 2. implicit state or explicit (bound to some object) Implicit. If explicit state is needed, it can be provided by other means= . > 3. how much of the context where given execution path is nested would = be > accessible? Explicitly bounded. > 4. inheritance issues May be disallowed for dispatching operations. > Maybe instead of coroutines... Ada does not specify whether tasks shou= ld = > be > native. What about providing tasks scheduled by the RTL (or user), in > addition to the native tasks, not as a replacement. Such tasks would h= ave > many limitations regarding I/O, but no more coroutines would. And they= = > will > be lighter than native tasks. If you mean kind of green threads, I would say no, as I guess you mean = something pre=E2=80=91emptive, and I mean something sequential with no = concurrency, like with sub=E2=80=91program invocation in a single task. There are ways to workaround it with actual Ada, but that's not handy. = There is the state machine which requires to flatten the conditional = structures in a case statement, and that does not help readability and = maintenance; sometime it comes as the most natural way to express things= , = but not always. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity