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,86c750b8474bf6d5 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!nlpi057.nbdc.sbc.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: About String Date: Sun, 08 Jun 2008 17:19:11 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <484ABED3.8040909@obry.net> <484b802a$0$23844$4f793bc4@news.tdc.fi> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1212959951 5808 192.74.137.71 (8 Jun 2008 21:19:11 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 8 Jun 2008 21:19:11 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:LCnwdo//cG5bW+ezIZgdxCD+9G8= Xref: g2news1.google.com comp.lang.ada:622 Date: 2008-06-08T17:19:11-04:00 List-Id: Maciej Sobczak writes: > You did not state it explicitly, but I presume that you allow mixing > declarations with executable code ("as in Java and other languages")? Yes, if I ran the circus, I would allow that. I really find it annoying that I have to add 3 useless lines of code (declare/begin/end) and an extra level of indentation, when all I wanted to do was declare a very-local object. I also find it annoying that I can't add a statement at the beginning of a procedure, without moving everything into a local block. E.g. I have: procedure P (X : Integer) is Local : constant String := ...; begin ... and I want add: if X = 0 then raise Blah; end if; and I want that to come first. > After all, with the possibility to initialize the new variable with > arbitrarily complex expression (including function call), this is > already the case and the whole declare-begin-end block is just > reflecting some artificial separation. I agree. I suppose it comes from Pascal, where declarations and executable code are completely separated. It makes no sense in Ada, where declarations are just as executable as statements. - Bob