From: Simon Wright <simon@pushface.org>
Subject: Re: Record initialisation question
Date: Thu, 14 Jan 2021 21:32:39 +0000 [thread overview]
Message-ID: <lyo8hrdx1k.fsf@pushface.org> (raw)
In-Reply-To: 13d2ea86-f9a4-4015-8171-9e7c0f7c80a4n@googlegroups.com
Shark8 <onewingedshark@gmail.com> writes:
> On Tuesday, January 12, 2021 at 4:38:24 AM UTC-7, Simon Wright wrote:
>> Shark8 writes:
>>
>> >> I'll try it but I've just faced another problem where a component of
>> >> another record is the address of the record itself.
>> >
>> > Type Example;
>> > Function To_Address( Input : Access Example ) return System.Address
>> > with Inline;
>> >
>> > Type Example is limited record
>> > Addr : System.Address := To_Address(Example'Access);
>> > End record;
>> >
>> > Package Cvt is new System.Address_To_Access_Conversions(Example);
>> > Function To_Address( Input : Access Example ) return System.Address is
>> > ( Cvt.To_Address( Input.all'Access ) );
>> (what is it with this weird casing "convention" you use? makes the code
>> quite hard to read ...)
> Really?
> How so?
Just looking at the first line, I see
Type Example;
and I don't recognise it as Ada; I think that this is a textual comment
saying that this is an example relating in some way to types. Similar,
but a little less distracting, with other keywords throughout.
What is the convention? Is it perhaps that the first word on a line gets
capitalised? but then, in the second line, we have
... Input : Access Example ) return ...
and the third line starts with "with".
So it's just some keywords that get capitalised.
Basically, I find it jarring and distracting.
We would disagree about spacing round parentheses as well.
De gustibus ...!
next prev parent reply other threads:[~2021-01-14 21:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-09 9:30 Record initialisation question DrPi
2021-01-09 10:46 ` Dmitry A. Kazakov
2021-01-10 16:41 ` DrPi
2021-01-11 21:48 ` Shark8
2021-01-12 11:38 ` Simon Wright
2021-01-12 15:01 ` Shark8
2021-01-14 21:32 ` Simon Wright [this message]
2021-01-14 23:12 ` Shark8
2021-01-14 12:58 ` DrPi
2021-01-17 17:03 ` DrPi
2021-01-17 23:55 ` Shark8
2021-01-18 20:02 ` DrPi
2021-01-19 5:50 ` Randy Brukardt
2021-01-09 15:44 ` Niklas Holsti
2021-01-10 16:53 ` DrPi
2021-01-10 19:30 ` Niklas Holsti
2021-01-10 21:27 ` DrPi
2021-01-10 22:14 ` Niklas Holsti
2021-01-11 17:46 ` DrPi
2021-01-11 20:58 ` Niklas Holsti
2021-01-14 13:07 ` DrPi
2021-01-14 13:36 ` AdaMagica
2021-01-14 14:07 ` Jeffrey R. Carter
2021-01-14 14:09 ` Jeffrey R. Carter
2021-01-14 14:27 ` Niklas Holsti
2021-01-14 16:53 ` Shark8
2021-01-15 7:50 ` DrPi
2021-01-15 18:15 ` Shark8
2021-01-16 10:28 ` DrPi
2021-01-14 16:59 ` Paul Rubin
2021-01-15 7:49 ` DrPi
2021-01-17 17:08 ` 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