From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Map iteration and modification
Date: Sun, 7 Jan 2024 16:06:10 +0100 [thread overview]
Message-ID: <uneel2$12ufr$1@dont-email.me> (raw)
In-Reply-To: <unav7n$haul$1@dont-email.me>
On 2024-01-06 08:25, Randy Brukardt wrote:
>
> @ is regular in the sense that it is allowed anywhere in an expression. If
> you tried to expand the use to other contexts, you would have to
> differentiate them, which would almost certainly require some sort of
> declaration. But doing that risks making the mechanism as wordy as what it
> replaces (which obviously defeats the purpose).
>
> We looked at a number of ideas like that, but they didn't seem to help
> comprehension. In something like:
> LHS:(X(Y)) := LHS + 1;
> (where LHS is an arbitrary identifier), if the target name is fairly long,
> it could be hard to find where the name for the target is given, and in any
> case, it adds to the name space that the programmer has to remember when
> reading the source expression. That didn't seem to add to readability as
> much as the simple @ does.
>
> In any case, these things are trade-offs, and certainly nothing is absolute.
> But @ is certainly much more general than ":=+" would be, given that it
> works with function calls and array indexing and attributes and user-defined
> operations rather than just a single operator.
For the 9X and 0X revisions I suggested adding "when <condition>" to return and
raise statements, similar to its use on exit statements. This was rejected
because the language already has a way to accomplish this: if statements.
Given that one can do
declare
V : T renames Very_Long_Identifier;
begin
V := V - 23;
end;
it seems that @ should also have been rejected. Probably more so, since @ is
completely new syntax rather than reusing existing syntax on some additional
statements. What is the justification of accepting @ while still rejecting the
other?
--
Jeff Carter
"If I could find a sheriff who so offends the citizens of Rock
Ridge that his very appearance would drive them out of town ...
but where would I find such a man? Why am I asking you?"
Blazing Saddles
37
next prev parent reply other threads:[~2024-01-07 15:06 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 13:53 Map iteration and modification DrPi
2023-12-28 13:59 ` DrPi
2023-12-28 16:06 ` Dmitry A. Kazakov
2023-12-28 17:57 ` DrPi
2023-12-29 3:20 ` Randy Brukardt
2023-12-29 9:51 ` Dmitry A. Kazakov
2023-12-29 15:03 ` G.B.
2023-12-29 16:52 ` Dmitry A. Kazakov
2024-01-01 19:27 ` G.B.
2024-01-01 20:55 ` Dmitry A. Kazakov
2024-01-02 16:40 ` G.B.
2024-01-02 20:57 ` Dmitry A. Kazakov
2024-01-03 3:22 ` Randy Brukardt
2024-01-03 4:05 ` moi
2023-12-30 7:21 ` Randy Brukardt
2023-12-30 11:07 ` Dmitry A. Kazakov
2024-01-03 3:15 ` Randy Brukardt
2024-01-03 10:04 ` Dmitry A. Kazakov
2024-01-04 4:07 ` Randy Brukardt
2024-01-04 11:28 ` Dmitry A. Kazakov
2024-01-05 2:00 ` Randy Brukardt
2024-01-05 9:26 ` Simon Wright
2024-01-05 11:51 ` Dmitry A. Kazakov
2024-01-06 7:25 ` Randy Brukardt
2024-01-07 15:06 ` Jeffrey R.Carter [this message]
2024-01-09 4:46 ` Randy Brukardt
2024-01-09 5:56 ` when-clauses (was Re: Map iteration and modification) Lawrence D'Oliveiro
2024-01-09 9:43 ` Map iteration and modification Jeffrey R.Carter
2024-04-17 10:12 ` Cóilín Nioclás Pól Glostéir
2024-01-06 2:54 ` “Usability” (was Re: Map iteration and modification) Lawrence D'Oliveiro
2024-01-06 7:03 ` "Usability" " Randy Brukardt
2024-01-06 8:14 ` Niklas Holsti
2024-01-06 23:41 ` Lawrence D'Oliveiro
2024-01-07 1:21 ` J-P. Rosen
2024-01-09 15:19 ` Bill Findlay
2024-01-09 20:30 ` Lawrence D'Oliveiro
2023-12-29 3:08 ` Map iteration and modification Randy Brukardt
2023-12-29 13:53 ` DrPi
2023-12-30 6:29 ` Randy Brukardt
2023-12-31 13:56 ` DrPi
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox