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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.234.38 with SMTP id ub6mr6758600pbc.2.1337010631763; Mon, 14 May 2012 08:50:31 -0700 (PDT) Path: pr3ni25393pbb.0!nntp.google.com!news1.google.com!goblin2!goblin3!goblin.stu.neva.ru!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 14 May 2012 17:50:07 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <4fb10423$0$6628$9b4e6d93@newsspool2.arcor-online.net> <77mwuc5z6kdu.14qt5gh4wmt7i$.dlg@40tude.net> In-Reply-To: <77mwuc5z6kdu.14qt5gh4wmt7i$.dlg@40tude.net> Message-ID: <4fb129b0$0$6630$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 14 May 2012 17:50:08 CEST NNTP-Posting-Host: e00c982d.newsspool2.arcor-online.net X-Trace: DXC=iRbFi:6o]I;NTD55K=A9EHlD;3Yc24Fo<]lROoR18kFj8fVEViW>nc\616M64>:Lh>_cHTX3j=TZJGE12[HW> X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: 2012-05-14T17:50:08+02:00 List-Id: On 14.05.12 15:40, Dmitry A. Kazakov wrote: > On Mon, 14 May 2012 15:09:54 +0200, Georg Bauhaus wrote: > >> On 14.05.12 14:19, Dmitry A. Kazakov wrote: > >>> P.S. I wonder why people keep on calling that thing loop. It has little to >>> do with iterations. It is a set of paramerized sequences of statements >>> executed asynchronously with a synchronization point at the end. The syntax >>> should reflect that. >> >> For a start, >> >> for all I in 1 .. 10 do >> { stmt } >> end do all; > > Yes, I also thought about that, but it still looks much like a loop. with all I in 1 .. 10 do { stmt } end do all; That's a non-loop indicator up front. >> for some I in 1 .. 10 do >> { stmt } >> end do some; with some I in 1 .. 10 do { stmt } end do some; > I considered how to do this: > > up-to-10-instances of > ... > accept Service_Request do > ... > end do; > ... > end; > > The semantics is: accept 1 to 10 calls to the entry Service_Request and > service all rendezvous concurrently. How would this work? Expanded into a family? I had thought that each acceptor servicing would have to perform one atomic sequence, unless all calls get serviced in the exact same way. >> While we are at it, can we have goal directed evaluation � la Icon? >> >> while some I ... => P(I, ...) do >> { stmt } >> end do some; > > The semantics is unclear, how does I change? Is it inference? The idea is that "some I ..." produces a value as long as (a) a value is needed and (b) P(I, ...) is true. This is probably a little vague, and in part syntactic sugar. procedure Iconic is -- -- every subject ? write (find ("fish")); -- prints 3, 13, and 23. -- Subject : constant String := "a fish is a fish is a fish"; Max : constant Natural := 2; -- no more than `Max` fish function Find ( Source : String; Pattern : String ) return Forward_Iterator; begin if some Position in Find(Subject, "fish") => True then Put_Line (Natural'Image (Position)); end if; if some Position in Find(Subject, "fish") => Position < Subject'Length / 2 then Put_Line (Natural'Image (Position)); end if; while some Position in Find (Subject, "fish") => Position < Subject'Length / 2 do Put_Line (Natural'Image (Position)); end do; N := 0; while some Position in Find (Subject, "fish") => N < Max do N := N + 1; Put_Line (Natural'Image (Position)); end do; end Iconic;