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: a07f3367d7,23c0de5a42cf667e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: GNAT packages in Linux distributions Date: Wed, 12 May 2010 18:49:53 +0200 Organization: Ada At Home Message-ID: References: <87mxw9x7no.fsf@ludovic-brenta.org> <16bz9kvbqa8y9$.155ntpwpwl29d.dlg@40tude.net> <4be97bea$0$2966$ba4acef3@reader.news.orange.fr> <4ebd36b8-ea2f-4879-aee6-2ac23a92ffc9@b7g2000yqk.googlegroups.com> NNTP-Posting-Host: FD8vExnEy5iRSNWAUP6U/Q.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.53 (Win32) Xref: g2news2.google.com comp.lang.ada:11560 Date: 2010-05-12T18:49:53+02:00 List-Id: Le Wed, 12 May 2010 17:59:21 +0200, Phil Thornley = a =C3=A9crit: > Sorry, Yannick, but you are wrong. > > Recursion between subprograms in different packages is prohibited by > the rule that mutual inheritance between packages is not allowed. That's one of that severe limitations so (noted, as I'm learning). > Recursion between subprograms in a single package (including self- > recursion) is prohibited by the rule that a subprogram cannot be > called until all of its body has been declared. I don't think this is= > mentioned in the SPARK language description, but if you violate this > rule you get semantic error 163: An attempt to give an answer : I had to drop recursivity in a JavaScript= = application, because this was a long process and JavaScript has no suppo= rt = at all for multi-tasking (except with some tricks relying on pop-up = windows... which unfortunately browsers blocks). So I had to rely on = timer, bounded execution chunk (kind of cooperative multitasking as it w= as = with Windows 3.1) and had to re-implement recursivity on top of an array= = used as a stack. The =E2=80=9Cprocess=E2=80=9D was reloading its previou= s state from = variables each time it was resuming, and as there was obviously no way t= o = restore the stack pointer (JavaScript is not C or assembly you know), I = = had to re-implement the stack this way. I suppose this kind of recursivity would be OK. May be this help analysis after all ? And there are recursivities which can be dropped, like the one of = binary-search (a kind of final recursivity, and that is a common = optimization in functional languages to drop these) > I haven't seen the latest SPARK version yet (still waiting for the GPL= > version) but I would be very surprised if this has changed since the > last version. > > Cheers, > > Phil The one I've installed yesterday is version 8.1.1. Not version 9 Mark L = = talked about, however, this one seems to already have support for generi= cs. -- = pragma Asset ? Is that true ? Waaww... great