From: "Vasiliy Molostov" <molostoff@gmail.com>
Subject: Re: Real syntax problems in Ada
Date: Wed, 29 Aug 2012 00:18:39 +0400
Date: 2012-08-29T00:18:39+04:00 [thread overview]
Message-ID: <op.wjrpddbwka8ora@aspire.local> (raw)
In-Reply-To: 1xfc5a70g33xq.6o52bn9evjls$.dlg@40tude.net
Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> писал(а) в своём письме Tue,
28 Aug 2012 19:23:42 +0400:
> a symmetric declaration of a procedure would be:
>
> X : procedure :=
> begin
> ...
> end X;
mnmn. where to apply parameter list declaration (suppose this as procedure
type "constraint")?
instead of subprogram access types we have objects in itself, how to
operate them? and ":=" is a re-definable construct, as I remember, while
we can not express operations on sub-program body. How about to implement
simple "<", ">" for sub-program bodies? hehe.
I am not sure that it is appropriate.
> Diag : Matrix :=
> ( 1 => (1 => 1.0, others => 0.0),
> 2 => (2 => 1.0, others => 0.0),
> 3 => (3 => 1.0, others => 0.0));
Yep, agree, it would be very helpful for multidims, but indeed the type of
"(1 => 1.0, others => 0.0)" is unknown (anonymous), we can not cast
already prepared objects (aka tmp := (1 => 1.0, others => 0.0)) to supply
to this construct. So as a result this one is useless without referencing
another variable or constant in this constraint.
How about "(T'(1..1, 1..1 | 2..2) => 1, others => 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 variants
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 when
it is stable for a long time (e.g. unchanged). e.g. much better to have it
as an error.
Gnat and lucky? Hmmm.
--
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/
next prev parent reply other threads:[~2012-08-28 20:18 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 8:13 Real syntax problems in Ada Dmitry A. Kazakov
2012-08-28 10:20 ` Georg Bauhaus
2012-08-28 10:47 ` Niklas Holsti
2012-08-28 11:33 ` J-P. Rosen
2012-08-31 13:35 ` Robert A Duff
2012-08-28 13:27 ` Vasiliy Molostov
2012-08-28 15:23 ` Dmitry A. Kazakov
2012-08-28 20:18 ` Vasiliy Molostov [this message]
2012-08-29 7:25 ` Dmitry A. Kazakov
2012-08-29 10:47 ` Vasiliy Molostov
2012-08-29 11:58 ` Dmitry A. Kazakov
2012-08-30 17:38 ` Vasiliy Molostov
2012-08-28 15:14 ` Adam Beneschan
2012-08-28 16:18 ` J-P. Rosen
2012-08-28 16:39 ` Dmitry A. Kazakov
2012-08-28 21:38 ` Randy Brukardt
2012-08-29 6:58 ` Dmitry A. Kazakov
2012-08-29 10:43 ` stefan-lucks
2012-08-29 10:58 ` stefan-lucks
2012-08-29 13:14 ` Niklas Holsti
2012-08-29 17:52 ` stefan-lucks
[not found] ` <fbps38pgcuf8fgioptt39s6u7dme1aqs7r@invalid.netcom.com>
2012-09-02 10:16 ` svaa
2012-08-29 13:33 ` Georg Bauhaus
2012-08-29 17:20 ` Jeffrey Carter
2012-08-29 17:51 ` stefan-lucks
2012-08-30 9:12 ` Georg Bauhaus
2012-08-28 21:49 ` Randy Brukardt
2012-08-28 23:09 ` Adam Beneschan
2012-08-29 7:34 ` Egil Høvik
2012-08-28 19:41 ` Florian Weimer
2012-08-28 20:53 ` Shark8
2012-08-28 21:07 ` Adam Beneschan
2012-08-28 21:25 ` Shark8
2012-08-28 22:59 ` Adam Beneschan
2012-08-29 7:06 ` Dmitry A. Kazakov
2012-08-30 21:08 ` Randy Brukardt
2012-08-30 22:06 ` sbelmont700
2012-08-30 22:34 ` Adam Beneschan
2012-08-30 22:54 ` William Findlay
2012-08-31 7:39 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox