comp.lang.ada
 help / color / mirror / Atom feed
From: Bill Findlay <yaldnif.w@blueyonder.co.uk>
Subject: Re: Dereferencing and style guides
Date: Fri, 11 Oct 2013 09:07:26 +0100
Date: 2013-10-11T09:07:26+01:00	[thread overview]
Message-ID: <CE7D704E.38619%yaldnif.w@blueyonder.co.uk> (raw)
In-Reply-To: wcchaco3fne.fsf@shell01.TheWorld.com

On 10/10/2013 23:49, in article wcchaco3fne.fsf@shell01.TheWorld.com,
"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote:

> Adam Beneschan <adambeneschan@aol.com> writes:
> 
>> I can imagine that Ada might have adopted the same syntax, if only
>> those old keypunch machines had a ^ character on them.
> 
> I thought they did.  Except it looked like an up-arrow.
> 
> Anyway, the solution to keyboards with missing characters
> is clear: see J.2.  7-bit ASCII was standard at the time.
> 
>> On the other hand, I'm not sure about the idea that "making things
>> just one character" equates to readability.  If that were true, APL
>> would be the most readable language around.  And C would be second.
> 
> Well, I didn't say everything should be one character.  I said
> the dereference operator should be one character.  So I'd say
> APL is a bit of a straw man here.  I'm quite happy to say
> "end if;" where C says "}".
> 
> In Ada, dereference is usually zero characters, so I'm actually arguing
> for MORE verbosity!  Just a little more.

Can I make the contrary case?

Given that we know that P is a pointer, P.f or P(i) can only reasonably be
interpreted as dereferencing P and selecting a component from the result; so
I do not see that P^.f or P^(i) improves comprehensibility to any
significant degree.

Given that we do not know that P is a pointer, P.f or P(i) is essentially
the same cognitive burden as R.f or A(i); from the uniform referent point of
view this is an advantage.  It fails to be, only if the dereference fails,
and we know that that should not happen in Ada 8-).  Even if it does, the
extra effort of perceiving the semantics correctly is trivial.

-- 
Bill Findlay
with blueyonder.co.uk;
use  surname & forename;




  reply	other threads:[~2013-10-11  8:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30  6:35 Dereferencing and style guides Natasha Kerensikova
2013-09-30  7:13 ` Dmitry A. Kazakov
2013-09-30 12:51 ` Robert A Duff
2013-09-30 16:49   ` Georg Bauhaus
2013-09-30 18:18     ` Jeffrey Carter
2013-10-03 19:20     ` Robert A Duff
2013-10-04 13:22       ` Georg Bauhaus
2013-10-04 13:25         ` Georg Bauhaus
2013-10-07 16:10       ` Eryndlia Mavourneen
2013-10-08  0:48         ` Robert A Duff
2013-10-10  7:35           ` Stefan.Lucks
2013-10-10 14:48             ` Adam Beneschan
2013-10-10 22:49               ` Robert A Duff
2013-10-11  8:07                 ` Bill Findlay [this message]
2013-10-11 12:52                   ` Robert A Duff
2013-10-11 13:02                     ` G.B.
2013-10-11 13:19                     ` Bill Findlay
2013-10-19  2:40                     ` Randy Brukardt
2013-10-19  2:46                     ` Randy Brukardt
2013-10-19  2:36           ` Randy Brukardt
2013-09-30 13:53 ` Eryndlia Mavourneen
replies disabled

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