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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cae92f92d6a1d4b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Tue, 21 Dec 2010 12:19:47 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1292951986 1915 192.74.137.71 (21 Dec 2010 17:19:46 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 21 Dec 2010 17:19:46 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:ix295iKPG21uz79yvnggfEC6JH8= Xref: g2news1.google.com comp.lang.ada:16099 Date: 2010-12-21T12:19:47-05:00 List-Id: "Dmitry A. Kazakov" writes: > On Mon, 20 Dec 2010 22:23:12 -0500, Robert A Duff wrote: > >> Anyway, the strong syntactic separation between declarations >> and statements makes no sense in a language where declarations >> are executable code. I think it's just wrong-headed thinking >> inherited from Pascal. > > It still does have sense in a language with lexical scopes. You need some > syntactically recognizable point where all things of the same scope become > usable. Yes, you need such a "syntactically recognizable point". But that doesn't require any separation of declarations from statements. If My_Assert is just a regular user-defined procedure, then I see nothing wrong with: procedure P is X : T1 := ...; My_Assert(Is_Good(X)); -- Not Ada! Y : T2 := ...; My_Assert(not Is_Evil(Y)); ... without sprinkling "declares" and "begins" all over. - Bob