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: a07f3367d7,57f8540942f8e060 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!w27g2000pre.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Initialization and Finalization of limited object "returned" by a function Date: Fri, 12 Feb 2010 08:57:43 -0800 (PST) Organization: http://groups.google.com Message-ID: <9c2b5c56-7abf-4523-844d-b48447587402@w27g2000pre.googlegroups.com> References: <41b794ec-26b0-485e-a959-580a5b877a3b@f15g2000yqe.googlegroups.com> <8e09c20d-172e-42a2-b2ff-994863893523@h12g2000yql.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1265993864 1783 127.0.0.1 (12 Feb 2010 16:57:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 12 Feb 2010 16:57:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w27g2000pre.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9173 Date: 2010-02-12T08:57:43-08:00 List-Id: On Feb 12, 7:15=A0am, Robert A Duff wrote: > No, it should be syntactic. =A0And it should be more obvious > than counting the number of expressions between "(" and ")". > > Aggregates should use "[" and "]", so there's no confusion. > An empty aggregate would be "[ ]", and a singleton > would be "[X]". =A0As far as I know, the only reason > this wasn't done was because of keyboards/character sets > that didn't have those characters. =A0But that's a bogus > reason -- it could be done just like the stuff in J.2. I thought it was because of keypunch machines! Yes, there were still a few of those around when Ada was first designed. I also remember some of the attempted rationalizations at the time; in particular, why did Ada use parentheses for both subprogram calls and array indexing, when other popular languages (Pascal and C) used square brackets for indexing. Someone came up with an argument that it was actually a good thing to use the same characters for both, because then if your program uses Arr(Index), where Arr is an array, you could redesign your program to make "Arr" a function and the change would be transparent. That seemed like a stretch at the time. Now that the language requires compilers to allow identifiers containing any character in any alphabet that exists or has ever existed, including ancient languages like Ogham (http:// en.wikipedia.org/wiki/Ogham --- seriously, I'm dying to use an Eamhancholl in one of my variable names), there doesn't seem to be much justification for avoiding square and curly brackets, besides inertia. No, you don't want use so many special characters that your program starts to look like Egyptial hieroglyphics---or worse, a C++ program---but I do think that allowing the sort of syntax you suggest for aggregates would be a plus. -- Adam