comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@futureapps.invalid>
Subject: Re: Functions vs constants
Date: Wed, 23 Jul 2014 14:37:51 +0200
Date: 2014-07-23T14:37:51+02:00	[thread overview]
Message-ID: <lqoab0$bnm$1@dont-email.me> (raw)
In-Reply-To: <lqmnbr$j13$1@loke.gir.dk>

On 23.07.14 00:07, Randy Brukardt wrote:
>     with P, Q; use P, Q;
>     procedure R is
>     begin
>         if Error then -- (1)
>            raise Error; -- (2)
>        end if;
>     end R;
>
> both (1) and (2) are illegal today. But there's no good reason for that; the
> profiles (imagining an extended idea of profile to include objects and
> exceptions) are different and there can be no more confusion between them
> than between overloaded enumeration literals.

Well, this text gives the reader a lucid hint at what the homonyms
might mean! Sounds like more context dependency as we have some
already, don't we. Good grief.

This over-overloading, rightfully frowned upon by SPARK (and not just
by SPARK), I think, plays into the hands of those programmers who like
to write less, be secretive, and brag about some unproductive linguistic
cleverness. Why force inference on readers of Ada programs?
The result is so similar to obfuscated source text. Javascript
compilers employ this very technique, i.e. they re-use names like `a'
as often as lexical bindings will permit.

IMHO, no single name should denote different objects appearing
in one piece of "discourse" (block). Prefixes are good!

JOE    - “Hey Jack!”
JACK_1 - “Yes?”
JACK_2 - “Yes?”
JOE    - “Push that jack over here!”
JACK_1 - “What?”
JACK_2 - “What has he done?"
JOE    - “No, the jack on wheels.”
JACK_1 - “None of us has wheel shoes.”
JACK_2 - “No, he means the flag.”
...

As you can see, homonyms make things appear silly (on at least
two accounts). But it doesn't stop here, since the internet of
things will, I'm certain, make jacks capable of reacting to
voice commands...

  parent reply	other threads:[~2014-07-23 12:37 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 21:18 Functions vs constants Victor Porton
2014-07-21 21:28 ` Victor Porton
2014-07-21 21:49   ` Shark8
2014-07-21 21:52     ` Victor Porton
2014-07-21 21:59       ` Adam Beneschan
2014-07-21 21:35 ` Niklas Holsti
2014-07-21 21:41   ` Victor Porton
2014-07-21 23:23   ` Randy Brukardt
2014-07-22  7:42     ` Dmitry A. Kazakov
2014-07-22 22:07       ` Randy Brukardt
2014-07-23  7:55         ` Dmitry A. Kazakov
2014-07-23 21:44           ` Randy Brukardt
2014-07-23 12:37         ` G.B. [this message]
2014-07-23 22:12           ` Randy Brukardt
2014-07-24  7:20             ` Stefan.Lucks
2014-07-25  4:43               ` Randy Brukardt
2014-07-26  2:36                 ` Shark8
2014-07-24  8:27             ` Georg Bauhaus
2014-07-24 10:11               ` Dmitry A. Kazakov
2014-07-24 10:49                 ` G.B.
2014-07-24 12:50                   ` Dmitry A. Kazakov
2014-07-25  4:56               ` Randy Brukardt
2014-07-25  6:45                 ` Georg Bauhaus
2014-07-25 10:46                   ` G.B.
2014-07-25 19:31                   ` Randy Brukardt
2014-07-25 20:02                     ` Dmitry A. Kazakov
2014-07-26  2:45                       ` Shark8
2014-07-26  8:02                         ` Dmitry A. Kazakov
2014-07-26 14:03                           ` Shark8
2014-07-26 14:18                             ` Dmitry A. Kazakov
2014-07-21 21:55 ` Victor Porton
2014-07-22  7:06 ` Maciej Sobczak
2014-07-22  7:50   ` Dmitry A. Kazakov
2014-07-22 22:14     ` Randy Brukardt
2014-07-23 13:21       ` Stephen Leake
2014-07-23 13:27         ` Victor Porton
2014-07-23 15:10         ` Adam Beneschan
2014-07-23 21:57 ` Robert A Duff
2014-07-24 12:25   ` Victor Porton
2014-07-24 15:53     ` Robert A Duff
2014-07-24 15:57       ` Victor Porton
2014-07-24 16:47   ` Pascal Obry
2014-07-24 12:26 ` anon
2014-07-24 12:52 ` Victor Porton
2014-07-24 16:01   ` Robert A Duff
2014-07-24 16:15     ` Adam Beneschan
2014-07-25  5:05     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox