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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6aa1ec264ce25142 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.180.24.135 with SMTP id u7mr2615596wif.3.1346185120947; Tue, 28 Aug 2012 13:18:40 -0700 (PDT) Path: e9ni61467913wia.0!nntp.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Vasiliy Molostov" Newsgroups: comp.lang.ada Subject: Re: Real syntax problems in Ada Date: Wed, 29 Aug 2012 00:18:39 +0400 Organization: None Message-ID: References: <1p5r39cusgc1n$.18nj9sytckk6$.dlg@40tude.net> <1xfc5a70g33xq.6o52bn9evjls$.dlg@40tude.net> NNTP-Posting-Host: Xw13RWgh8yxgPSv0x3+H9w.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.01 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-08-29T00:18:39+04:00 List-Id: Dmitry A. Kazakov =D0=BF=D0=B8=D1=81=D0=B0=D0= =BB(=D0=B0) =D0=B2 =D1=81=D0=B2=D0=BE=D1=91=D0=BC =D0=BF=D0=B8=D1=81=D1=8C= =D0=BC=D0=B5 Tue, = 28 Aug 2012 19:23:42 +0400: > a symmetric declaration of a procedure would be: > > X : procedure :=3D > begin > ... > end X; mnmn. where to apply parameter list declaration (suppose this as procedu= re = type "constraint")? instead of subprogram access types we have objects in itself, how to = operate them? and ":=3D" is a re-definable construct, as I remember, whi= le = we can not express operations on sub-program body. How about to implemen= t = simple "<", ">" for sub-program bodies? hehe. I am not sure that it is appropriate. > Diag : Matrix :=3D > ( 1 =3D> (1 =3D> 1.0, others =3D> 0.0), > 2 =3D> (2 =3D> 1.0, others =3D> 0.0), > 3 =3D> (3 =3D> 1.0, others =3D> 0.0)); Yep, agree, it would be very helpful for multidims, but indeed the type = of = "(1 =3D> 1.0, others =3D> 0.0)" is unknown (anonymous), we can not cast = = already prepared objects (aka tmp :=3D (1 =3D> 1.0, others =3D> 0.0)) to= supply = to this construct. So as a result this one is useless without referenci= ng = another variable or constant in this constraint. How about "(T'(1..1, 1..1 | 2..2) =3D> 1, others =3D> 0)"? And what type= of T = should be here? > type T is abstract tagged limited null record; -- Only so > > type T is abstract limited tagged null record; -- Illegal > type T is limited tagged abstract null record; -- Illegal > ... > > I bet very few would remember the proper order if asked unprepared. I remember very well, since it is only one order can be (and only one I = = should remember), and this can be considered as simplicity. Other varian= ts = can break eye on looking for similar constructs while they are just in = another order, no benefit, useless. > Luckily > GNAT would advise how to reorder the keywords in its error message. if this is for error message only, I can agree, but the rule is real whe= n = it is stable for a long time (e.g. unchanged). e.g. much better to have = it = as an error. Gnat and lucky? Hmmm. -- = =D0=9D=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE =D0=B2 =D0=BF=D0=BE=D1=87= =D1=82=D0=BE=D0=B2=D0=BE=D0=BC =D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B5= =D0=B1=D1=80=D0=B0=D1=83=D0=B7=D0=B5=D1=80=D0=B0 Opera: http://www.oper= a.com/mail/