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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9e7db243dfa070d7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Do people who use Ada also use ocaml or F#? Date: Sat, 30 Oct 2010 14:46:06 +0200 Organization: Ada @ Home Message-ID: References: <87ocab3mir.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: Na/DzFEojm3xeJnAcqh1Fw.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 X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.63 (Win32) Xref: g2news2.google.com comp.lang.ada:15940 Date: 2010-10-30T14:46:06+02:00 List-Id: Le Sat, 30 Oct 2010 14:14:52 +0200, Florian Weimer a = = =C3=A9crit: > * Yannick Duch=C3=AAne (Hibou57): > >> Ada 2012 introduced something looking like coroutines with the yield >> function (formally, generators), which is a famous feature of >> functional paradigm languages (gonna be great for kinds of streams o= f >> any kind of data or iterators). > > Is this AI05-166? I don't see how this leads to generators. I will not believe I am the only one who expect to use it for that = purpose. This would be incredible. I like it for iterators and every thing which is close or less close to = = streams in the large. I use to talk about =E2=80=9Ccoroutine=E2=80=9D he= re, while the real = coroutine is more than that. But I don't mind, as I was not expecting mo= re. What I like with it, is that it allow clean separation of the behavior a= nd = usage. You simply have one or more yield points, instead of returning fr= om = a procedure or function and having ugly control structure to go to the = resume point when the function is invoked again. This allow to give = control where the control should be given : weither the method is = controlling or is controlled, you have the same algorithm in both case, = = expressed the same way. Otherwise, a simulation of Yield simply make eve= ry = thing less clear, as half of what you write is dedicated to this Yield = simulation. There is no real need for real coroutine (which would just be a kind of = = green-thread), I believe Yield is enough, and this will probably not be = a = nightmare for implementors (I may be wrong, well, I hope). -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens.