Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

...and scantily clad females, of course. Who cares if it's below zero outside. -- Linus Torvalds


devel / comp.lang.ada / Re: Unchecked_Deallocation with tagged types

SubjectAuthor
* Unchecked_Deallocation with tagged typesDrPi
+* Re: Unchecked_Deallocation with tagged typesRod Kay
|`* Re: Unchecked_Deallocation with tagged typesRod Kay
| +- Re: Unchecked_Deallocation with tagged typesDrPi
| `- Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
`* Re: Unchecked_Deallocation with tagged typesDmitry A. Kazakov
 +* Re: Unchecked_Deallocation with tagged typesGautier write-only address
 |`* Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
 | +* Re: Unchecked_Deallocation with tagged typesDmitry A. Kazakov
 | |`* Re: Unchecked_Deallocation with tagged typesThomas
 | | `- Re: Unchecked_Deallocation with tagged typesDmitry A. Kazakov
 | `* Re: Unchecked_Deallocation with tagged typesJ-P. Rosen
 |  +* Re: Unchecked_Deallocation with tagged typesDmitry A. Kazakov
 |  |`* Re: Unchecked_Deallocation with tagged typesJ-P. Rosen
 |  | `* Re: Unchecked_Deallocation with tagged typesGautier write-only address
 |  |  +* Re: Unchecked_Deallocation with tagged typesJ-P. Rosen
 |  |  |`* Re: Unchecked_Deallocation with tagged typesGautier write-only address
 |  |  | `- Re: Unchecked_Deallocation with tagged typesThomas
 |  |  `* Re: Unchecked_Deallocation with tagged typesRandy Brukardt
 |  |   +* Re: Unchecked_Deallocation with tagged typesDmitry A. Kazakov
 |  |   |`* Re: Unchecked_Deallocation with tagged typesThomas
 |  |   | `- Re: Unchecked_Deallocation with tagged typesNiklas Holsti
 |  |   `* Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
 |  |    `* Re: Unchecked_Deallocation with tagged typesNiklas Holsti
 |  |     +* Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
 |  |     |`- Re: Unchecked_Deallocation with tagged typesDmitry A. Kazakov
 |  |     `* Re: Unchecked_Deallocation with tagged typesRandy Brukardt
 |  |      `- Re: Unchecked_Deallocation with tagged typesThomas
 |  `- Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
 `* Re: Unchecked_Deallocation with tagged typesDrPi
  +* Re: Unchecked_Deallocation with tagged typesDmitry A. Kazakov
  |`- Re: Unchecked_Deallocation with tagged typesDrPi
  `* Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
   `* Re: Unchecked_Deallocation with tagged typesStephen Leake
    `* Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
     +* Re: Unchecked_Deallocation with tagged typesVincent Marciante
     |`* Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
     | `* Re: Unchecked_Deallocation with tagged typesVincent Marciante
     |  +- Re: Unchecked_Deallocation with tagged typesVincent Marciante
     |  +- Re: Unchecked_Deallocation with tagged typesSimon Wright
     |  +* Re: Unchecked_Deallocation with tagged typesJ-P. Rosen
     |  |`- Re: Unchecked_Deallocation with tagged typesVincent Marciante
     |  +- Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
     |  `* Re: Unchecked_Deallocation with tagged typesRandy Brukardt
     |   `* use clausesThomas
     |    `* Re: use clausesRandy Brukardt
     |     +* Re: use clauses25.BX944
     |     |+- Re: use clausesEmmanuel Briot
     |     |`- Re: use clausesDoctor Who
     |     `* Re: use clausesThomas
     |      `- Re: use clausesRandy Brukardt
     `* Re: Unchecked_Deallocation with tagged typesStephen Leake
      `* Re: Unchecked_Deallocation with tagged typesJeffrey R. Carter
       `- Re: Unchecked_Deallocation with tagged typesVincent Marciante

Pages:123
Re: Unchecked_Deallocation with tagged types

<s5ndog$p57$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5083&group=comp.lang.ada#5083

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Tue, 20 Apr 2021 22:32:16 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 18
Message-ID: <s5ndog$p57$1@dont-email.me>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org>
<07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com>
<s5gt17$7d0$2@dont-email.me> <s5h167$2f0$1@dont-email.me>
<s5h1vv$anq$1@gioia.aioe.org> <s5hic3$nab$1@dont-email.me>
<3d6e49b6-f195-4dc2-bf4b-795f18f2da9dn@googlegroups.com>
<s5n7va$c83$1@franka.jacob-sparre.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 20 Apr 2021 20:32:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="547c960cf1afa81c407cf6082b4bd11e";
logging-data="25767"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+c+ILys5T07nPlMb/q8E9zgdH8+/1YP/U="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.7.1
Cancel-Lock: sha1:6InQoR3NmCfkhbInrsA/9cJalBI=
In-Reply-To: <s5n7va$c83$1@franka.jacob-sparre.dk>
Content-Language: en-US
 by: Jeffrey R. Carter - Tue, 20 Apr 2021 20:32 UTC

On 4/20/21 8:53 PM, Randy Brukardt wrote:
>
> 'Free makes more sense in a new language (an Ada follow-on).

Right. I don't think it would be a good idea to add it to Ada.

But I think a new language should not have pointers at all.

No more radical than not having arrays.

--
Jeff Carter
"I'm particularly glad that these lovely children were
here today to hear that speech. Not only was it authentic
frontier gibberish, it expressed a courage little seen
in this day and age."
Blazing Saddles
88

Re: Unchecked_Deallocation with tagged types

<s5nf6q$3c4$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5084&group=comp.lang.ada#5084

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Tue, 20 Apr 2021 22:56:58 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 39
Message-ID: <s5nf6q$3c4$1@dont-email.me>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr>
<s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org>
<s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 20 Apr 2021 20:56:58 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="547c960cf1afa81c407cf6082b4bd11e";
logging-data="3460"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6Z8ze1P7/+myaaYlG7ueVlT8pZCG/reo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.7.1
Cancel-Lock: sha1:3ZZqY9qMJExXoR0Grq+79YanCx8=
In-Reply-To: <827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com>
Content-Language: en-US
 by: Jeffrey R. Carter - Tue, 20 Apr 2021 20:56 UTC

On 4/20/21 7:34 PM, Vincent Marciante wrote:
>
> Lists.List

My objection is that this says the same thing twice (hence my joke about adding
more variants of "List" to it). "This is a list, and by the way, this is a
list." To me, Lists.Handle says, "This is something that lets you manipulate a
hidden implementation of lists."

But the most important thing, I think, is that you've thought about naming and
can give meaningful reasoning for your choice. Too often the reason for wanting
to use the same name for everything is, "I don't want to think." But thinking of
good names is an important part of S/W engineering.

> (Wouldn't some "C" people argue for using the same name but
> different capitalization to disambiguate ?:-)

You can literally use the same name for almost everything in Ada:

package List is
type List is tagged limited private;

procedure Clear (List: in out Standard.List.List);

List : Standard.List.List;

List.Clear;

Even worse, in some cases you can use Latin, Greek, and Cyrillic letters with
very similar glyphs to disambiguate.

--
Jeff Carter
"I'm particularly glad that these lovely children were
here today to hear that speech. Not only was it authentic
frontier gibberish, it expressed a courage little seen
in this day and age."
Blazing Saddles
88

Re: Unchecked_Deallocation with tagged types

<ie8uagFqaf2U1@mid.individual.net>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5085&group=comp.lang.ada#5085

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Wed, 21 Apr 2021 00:10:40 +0300
Organization: Tidorum Ltd
Lines: 15
Message-ID: <ie8uagFqaf2U1@mid.individual.net>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org>
<07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com>
<s5gt17$7d0$2@dont-email.me> <s5h167$2f0$1@dont-email.me>
<s5h1vv$anq$1@gioia.aioe.org> <s5hic3$nab$1@dont-email.me>
<3d6e49b6-f195-4dc2-bf4b-795f18f2da9dn@googlegroups.com>
<s5n7va$c83$1@franka.jacob-sparre.dk> <s5ndog$p57$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net nSglsIg1uxGntIh9QkfbPALCl0kjGCxda+9LvZoRf0y7XWikCH
Cancel-Lock: sha1:mgT25tCOICnRmPceKoMahjXMeMc=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.7.0
In-Reply-To: <s5ndog$p57$1@dont-email.me>
Content-Language: en-US
 by: Niklas Holsti - Tue, 20 Apr 2021 21:10 UTC

On 2021-04-20 23:32, Jeffrey R. Carter wrote:
> On 4/20/21 8:53 PM, Randy Brukardt wrote:
>>
>> 'Free makes more sense in a new language (an Ada follow-on).
>
> Right. I don't think it would be a good idea to add it to Ada.
>
> But I think a new language should not have pointers at all.
>
> No more radical than not having arrays.

It seems to me that a language without arrays and pointers would be very
difficult to use in an embedded, real-time, close-to-HW context. So we
would lose the nice wide-spectrum nature of Ada.

Re: Unchecked_Deallocation with tagged types

<s5oo53$4kt$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5086&group=comp.lang.ada#5086

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Wed, 21 Apr 2021 10:35:45 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 35
Message-ID: <s5oo53$4kt$1@dont-email.me>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org>
<07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com>
<s5gt17$7d0$2@dont-email.me> <s5h167$2f0$1@dont-email.me>
<s5h1vv$anq$1@gioia.aioe.org> <s5hic3$nab$1@dont-email.me>
<3d6e49b6-f195-4dc2-bf4b-795f18f2da9dn@googlegroups.com>
<s5n7va$c83$1@franka.jacob-sparre.dk> <s5ndog$p57$1@dont-email.me>
<ie8uagFqaf2U1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 21 Apr 2021 08:35:47 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d9a3d62f61dbe0d007c6208cf9b6b246";
logging-data="4765"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186TpA5zP/9gQFyttaXgpBiZn7c0wEc+/g="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.7.1
Cancel-Lock: sha1:c0dr7S89fiRmupX7kMYGC1bXbww=
In-Reply-To: <ie8uagFqaf2U1@mid.individual.net>
Content-Language: en-US
 by: Jeffrey R. Carter - Wed, 21 Apr 2021 08:35 UTC

On 4/20/21 11:10 PM, Niklas Holsti wrote:
> On 2021-04-20 23:32, Jeffrey R. Carter wrote:
>> On 4/20/21 8:53 PM, Randy Brukardt wrote:
>>>
>>> 'Free makes more sense in a new language (an Ada follow-on).
>>
>> Right. I don't think it would be a good idea to add it to Ada.
>>
>> But I think a new language should not have pointers at all.
>>
>> No more radical than not having arrays.
>
>
> It seems to me that a language without arrays and pointers would be very
> difficult to use in an embedded, real-time, close-to-HW context. So we would
> lose the nice wide-spectrum nature of Ada.

I don't see that pointers are needed for such S/W.

Brukardt has recently been discussing the idea that a high-level language such
as Ada should not have arrays, which is why I referenced it. Such a language
might not be convenient for such systems.

But the idea is that arrays are a low-level implementation feature that are
usually used to implement higher-level abstractions, such as sequences and maps.
A language without arrays would have direct support for such abstractions. My
experience is that most uses of arrays in embedded, real-time S/W are also for
such abstractions, so it would probably not be too great a problem.

--
Jeff Carter
"Monsieur Arthur King, who has the brain of a duck, you know."
Monty Python & the Holy Grail
09

Re: Unchecked_Deallocation with tagged types

<s5otnp$ii8$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5088&group=comp.lang.ada#5088

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Wed, 21 Apr 2021 12:11:07 +0200
Organization: Aioe.org NNTP Server
Lines: 48
Message-ID: <s5otnp$ii8$1@gioia.aioe.org>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org>
<07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com>
<s5gt17$7d0$2@dont-email.me> <s5h167$2f0$1@dont-email.me>
<s5h1vv$anq$1@gioia.aioe.org> <s5hic3$nab$1@dont-email.me>
<3d6e49b6-f195-4dc2-bf4b-795f18f2da9dn@googlegroups.com>
<s5n7va$c83$1@franka.jacob-sparre.dk> <s5ndog$p57$1@dont-email.me>
<ie8uagFqaf2U1@mid.individual.net> <s5oo53$4kt$1@dont-email.me>
NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.9.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Wed, 21 Apr 2021 10:11 UTC

On 2021-04-21 10:35, Jeffrey R. Carter wrote:
> On 4/20/21 11:10 PM, Niklas Holsti wrote:
>> On 2021-04-20 23:32, Jeffrey R. Carter wrote:
>>> On 4/20/21 8:53 PM, Randy Brukardt wrote:
>>>>
>>>> 'Free makes more sense in a new language (an Ada follow-on).
>>>
>>> Right. I don't think it would be a good idea to add it to Ada.
>>>
>>> But I think a new language should not have pointers at all.
>>>
>>> No more radical than not having arrays.
>>
>>
>> It seems to me that a language without arrays and pointers would be
>> very difficult to use in an embedded, real-time, close-to-HW context.
>> So we would lose the nice wide-spectrum nature of Ada.
>
> I don't see that pointers are needed for such S/W.

Try to load and bind a relocatable library without pointers.

> Brukardt has recently been discussing the idea that a high-level
> language such as Ada should not have arrays, which is why I referenced
> it. Such a language might not be convenient for such systems.
>
> But the idea is that arrays are a low-level implementation feature that
> are usually used to implement higher-level abstractions, such as
> sequences and maps. A language without arrays would have direct support
> for such abstractions.

That is not enough, even if providing such abstractions were viable.
Which is not, because they would be far more complex than array
abstraction and resolve none of the problems array abstraction has. E.g.
container subtypes constrained to subtypes of elements and/or subtypes
of keys.

Array is a simplest case of container. If you cannot handle arrays, how
do you hope to handle maps?

Then see above, and explain how an opaque map will deal with a shared
memory mapped into the process address space? Or what would be the
primitive operation Write of Root_Stream_Type?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Unchecked_Deallocation with tagged types

<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5089&group=comp.lang.ada#5089

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:6214:da7:: with SMTP id h7mr14405432qvh.48.1619000516829;
Wed, 21 Apr 2021 03:21:56 -0700 (PDT)
X-Received: by 2002:a25:dfd0:: with SMTP id w199mr30709587ybg.92.1619000516683;
Wed, 21 Apr 2021 03:21:56 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 21 Apr 2021 03:21:56 -0700 (PDT)
In-Reply-To: <s5nf6q$3c4$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=35.245.252.196; posting-account=XfA3zgkAAABoz6fRf3Tehtnqqr7Ycml-
NNTP-Posting-Host: 35.245.252.196
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org>
<607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me>
<86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
Subject: Re: Unchecked_Deallocation with tagged types
From: vincent....@l3harris.com (Vincent Marciante)
Injection-Date: Wed, 21 Apr 2021 10:21:56 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Vincent Marciante - Wed, 21 Apr 2021 10:21 UTC

On Tuesday, April 20, 2021 at 4:57:00 PM UTC-4, Jeffrey R. Carter wrote:
> On 4/20/21 7:34 PM, Vincent Marciante wrote:
> >
> > Lists.List
>
> My objection is that this says the same thing twice (hence my joke about adding
> more variants of "List" to it). "This is a list, and by the way, this is a
> list." To me, Lists.Handle says, "This is something that lets you manipulate a
> hidden implementation of lists."
>
> But the most important thing, I think, is that you've thought about naming ...

But that idiom pretty much prohibits "using" more than one package with such naming:

use Queues, Lists;

Queue : Handle; --\ Both
List : Handle; --/ ambiguous

vs.

Command_Queue : Queue;
Parameter_List : List;

I guess the issue is similar the past discussions on idiomatically naming
all tagged types Object.

Re: Unchecked_Deallocation with tagged types

<728b554d-75b5-49cd-8a10-c06332e5d959n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5090&group=comp.lang.ada#5090

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:4d03:: with SMTP id w3mr15599115qtv.222.1619000938879;
Wed, 21 Apr 2021 03:28:58 -0700 (PDT)
X-Received: by 2002:a25:1883:: with SMTP id 125mr30451961yby.465.1619000938705;
Wed, 21 Apr 2021 03:28:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 21 Apr 2021 03:28:58 -0700 (PDT)
In-Reply-To: <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=35.245.252.196; posting-account=XfA3zgkAAABoz6fRf3Tehtnqqr7Ycml-
NNTP-Posting-Host: 35.245.252.196
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org>
<607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me>
<86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me>
<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <728b554d-75b5-49cd-8a10-c06332e5d959n@googlegroups.com>
Subject: Re: Unchecked_Deallocation with tagged types
From: vincent....@l3harris.com (Vincent Marciante)
Injection-Date: Wed, 21 Apr 2021 10:28:58 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Vincent Marciante - Wed, 21 Apr 2021 10:28 UTC

On Wednesday, April 21, 2021 at 6:21:57 AM UTC-4, Vincent Marciante wrote:
> On Tuesday, April 20, 2021 at 4:57:00 PM UTC-4, Jeffrey R. Carter wrote:
> > On 4/20/21 7:34 PM, Vincent Marciante wrote:
> > >
> > > Lists.List
> >
> > My objection is that this says the same thing twice (hence my joke about adding
> > more variants of "List" to it). "This is a list, and by the way, this is a
> > list." To me, Lists.Handle says, "This is something that lets you manipulate a
> > hidden implementation of lists."
> >
> > But the most important thing, I think, is that you've thought about naming ...
>
> But that idiom pretty much prohibits "using" more than one package with such naming:
>
> use Queues, Lists;
>
> Queue : Handle; --\ Both
> List : Handle; --/ ambiguous
>
> vs.
>
> Command_Queue : Queue;
> Parameter_List : List;
>
> I guess the issue is similar the past discussions on idiomatically naming
> all tagged types Object.

Ha! Guess one would just write:

Queue :Queues. Handle List :Lists. HandleUltimately, unless something is just too wordy it is just a matter of personal taste:

Queue : Pack_Queues_Package.T_Queue_Handle_Type: --Bad!

Re: Unchecked_Deallocation with tagged types

<ly35vj6djy.fsf@pushface.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5091&group=comp.lang.ada#5091

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Wed, 21 Apr 2021 13:13:21 +0100
Organization: Aioe.org NNTP Server
Lines: 15
Message-ID: <ly35vj6djy.fsf@pushface.org>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr>
<s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org>
<s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com>
<s5nf6q$3c4$1@dont-email.me>
<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
NNTP-Posting-Host: yy9MKEJN2ULhWGfnfq4v5w.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:qjBe/21CxGiJhdOlGiP+Q+w618k=
 by: Simon Wright - Wed, 21 Apr 2021 12:13 UTC

Vincent Marciante <vincent.marciante@l3harris.com> writes:

> But that idiom pretty much prohibits "using" more than one package
> with such naming:
>
> use Queues, Lists;
>
> Queue : Handle; --\ Both
> List : Handle; --/ ambiguous

A good thing, too.

Anyway, you can still say "Queue : Queues.Handle;".

And Queue probably isn't a very good name for the object.

Re: Unchecked_Deallocation with tagged types

<s5p994$m5$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5092&group=comp.lang.ada#5092

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ros...@adalog.fr (J-P. Rosen)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Wed, 21 Apr 2021 15:28:04 +0200
Organization: Adalog
Lines: 23
Message-ID: <s5p994$m5$1@dont-email.me>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr>
<s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org>
<s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com>
<s5nf6q$3c4$1@dont-email.me>
<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Apr 2021 13:28:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="51c73389aff842bafa477a3cf4e114be";
logging-data="709"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iRwK+6QMu8DGxVWSNu8t1"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.10.0
Cancel-Lock: sha1:4iaToS9ZlaHrJO2t84fZLSSUMkM=
In-Reply-To: <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
Content-Language: fr
 by: J-P. Rosen - Wed, 21 Apr 2021 13:28 UTC

Le 21/04/2021 à 12:21, Vincent Marciante a écrit :
> But that idiom pretty much prohibits "using" more than one package with such naming:
>
> use Queues, Lists;
>
> Queue : Handle; --\ Both
> List : Handle; --/ ambiguous
>
I would not agree with "prohibits". You may still use qualified notation
in the scope of a "use" clause, so yes, you have to write:
Queue : Queues.Handle;
List : Lists.Handle;

which is not worse that having:
Queue : Queues_Handle;
List : Lists_Handle;

--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52
https://www.adalog.fr

Re: Unchecked_Deallocation with tagged types

<s5pa47$75v$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5093&group=comp.lang.ada#5093

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Wed, 21 Apr 2021 15:42:29 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 33
Message-ID: <s5pa47$75v$1@dont-email.me>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr>
<s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org>
<s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com>
<s5nf6q$3c4$1@dont-email.me>
<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 21 Apr 2021 13:42:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="4dc34c2b8d03e1c3394a35f4869e0b30";
logging-data="7359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/r4qFMLF1sez2tYpkuR9wNeHHEXV88FUg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.7.1
Cancel-Lock: sha1:KQaUq0jSJ12vLFjkqylErv/Cd4w=
In-Reply-To: <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
Content-Language: en-US
 by: Jeffrey R. Carter - Wed, 21 Apr 2021 13:42 UTC

On 4/21/21 12:21 PM, Vincent Marciante wrote:
> On Tuesday, April 20, 2021 at 4:57:00 PM UTC-4, Jeffrey R. Carter wrote:
>> On 4/20/21 7:34 PM, Vincent Marciante wrote:
>>>
>>> Lists.List
>>
>> My objection is that this says the same thing twice (hence my joke about adding
>> more variants of "List" to it). "This is a list, and by the way, this is a
>> list." To me, Lists.Handle says, "This is something that lets you manipulate a
>> hidden implementation of lists."
>>
>> But the most important thing, I think, is that you've thought about naming ...
>
> But that idiom pretty much prohibits "using" more than one package with such naming:
>
> use Queues, Lists;
>
> Queue : Handle; --\ Both
> List : Handle; --/ ambiguous

Yes. But you can't use your preferred naming (pkg Lists, type List) either:

Queue : Queue; -- Both
List : List; -- illegal

Unless you give the pkg name, too, which you can do in either case.

--
Jeff Carter
"Monsieur Arthur King, who has the brain of a duck, you know."
Monty Python & the Holy Grail
09

Re: Unchecked_Deallocation with tagged types

<86a6pqk89v.fsf@stephe-leake.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5101&group=comp.lang.ada#5101

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org.POSTED!not-for-mail
From: stephen_...@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Thu, 22 Apr 2021 01:55:56 -0700
Organization: Aioe.org NNTP Server
Lines: 44
Message-ID: <86a6pqk89v.fsf@stephe-leake.org>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr>
<s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org>
<s5n2nl$6ee$1@dont-email.me>
NNTP-Posting-Host: pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:EFxXDueJ1ov4jjWRGokTV0qLSgA=
 by: Stephen Leake - Thu, 22 Apr 2021 08:55 UTC

"Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org> writes:

> On 4/20/21 5:57 PM, Stephen Leake wrote:
>> "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org> writes:
>>
>>> package Lists is
>>> type Handle is tagged limited private;
>>>
>>> procedure Clear (List : in out Handle);
>>>
>>> and then use
>>>
>>> List : Lists.Handle;
>>>
>>> List.Clear;
>> Just to provide an alternative, I like:
>> package Lists is
>> type List is tagged limited private;
>> procedure Clear (List : in out Lists.List);
>> and then use
>> List : Lists.List;
>> List.Clear;
>
> Lists.List is a bit repetitive. Are you sure you don't want
> Lists.Listy_List_Listing?

Yes. It's a list. Just a list, nothing more, nothing less.

>
>
>> that saves you having to think up a bogus name for the 'list' type.
>
> I think of private types as allowing you to manipulate their
> abstraction without know how it's implemented, much as the handle on a
> suitcase allows you to manipulate its contents without knowing what's
> in there. So Handle seems an appropriate name.

In this case, the point of the package is precisely to provide a list,
implemented by an actual list. It's not a "bag" or some other "generic
container". That would be a at higher level, where the type would be
"bag" or "generic_container".

--
-- Stephe

Re: Unchecked_Deallocation with tagged types

<19656eed-db15-4910-804f-647971032bcbn@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5103&group=comp.lang.ada#5103

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ac8:d87:: with SMTP id s7mr2400048qti.32.1619086879845;
Thu, 22 Apr 2021 03:21:19 -0700 (PDT)
X-Received: by 2002:a5b:e90:: with SMTP id z16mr3765073ybr.303.1619086879715;
Thu, 22 Apr 2021 03:21:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 22 Apr 2021 03:21:19 -0700 (PDT)
In-Reply-To: <s5p994$m5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=35.245.252.196; posting-account=XfA3zgkAAABoz6fRf3Tehtnqqr7Ycml-
NNTP-Posting-Host: 35.245.252.196
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org>
<607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me>
<86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me>
<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com> <s5p994$m5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <19656eed-db15-4910-804f-647971032bcbn@googlegroups.com>
Subject: Re: Unchecked_Deallocation with tagged types
From: vincent....@l3harris.com (Vincent Marciante)
Injection-Date: Thu, 22 Apr 2021 10:21:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Vincent Marciante - Thu, 22 Apr 2021 10:21 UTC

On Wednesday, April 21, 2021 at 9:28:06 AM UTC-4, J-P. Rosen wrote:
> Le 21/04/2021 à 12:21, Vincent Marciante a écrit :
> > But that idiom pretty much prohibits "using" more than one package with such naming:
> >
> > use Queues, Lists;
> >
> > Queue : Handle; --\ Both
> > List : Handle; --/ ambiguous
> >
> I would not agree with "prohibits". You may still use qualified notation
> in the scope of a "use" clause, so yes, you have to write:
> Queue : Queues.Handle;
> List : Lists.Handle;
>
> which is not worse that having:
> Queue : Queues_Handle;
> List : Lists_Handle;
> --
> J-P. Rosen
> Adalog
> 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
> Tel: +33 1 45 29 21 52
> https://www.adalog.fr
Of course you are correct (my last response seems to have been garbled by Google groups).
But - in the case the there is only one such type involved, I'd prefer

X : List; Y : List; instead of X : Handle; Y : Handle;

I do not like the idea/idiom that the type always has the same name - handle - and
"thingness" is only expressed by the package name. _That_ seems way more redundant
and is a redundancy that cannot be removed by a "use" clause, whereas, the redundancy
in something like Guests : Lists.List; can be made to be Guests : List and still express
the nature of the data structure.

But like I wrote in my garbled response, I think that it ultimately become an issue of
individual preference. (Not talking about what might be the decree/agreement in the
guidelines/standard of a multi-person project.)

Re: Unchecked_Deallocation with tagged types

<s5rlv4$3ns$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5104&group=comp.lang.ada#5104

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.not.acm.org (Jeffrey R. Carter)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Thu, 22 Apr 2021 13:16:52 +0200
Organization: Also freenews.netfront.net; news.tornevall.net;
news.eternal-september.org
Lines: 20
Message-ID: <s5rlv4$3ns$1@dont-email.me>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr>
<s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org>
<s5n2nl$6ee$1@dont-email.me> <86a6pqk89v.fsf@stephe-leake.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 22 Apr 2021 11:16:52 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d7794966b333442d2349e2fda4cd48f8";
logging-data="3836"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/fscqW4NuDevPgirX140ubiCqaIJF3wlo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.7.1
Cancel-Lock: sha1:LC3perI9VVgPgtMyCQcb977jT7g=
In-Reply-To: <86a6pqk89v.fsf@stephe-leake.org>
Content-Language: en-US
 by: Jeffrey R. Carter - Thu, 22 Apr 2021 11:16 UTC

On 4/22/21 10:55 AM, Stephen Leake wrote:
>
> In this case, the point of the package is precisely to provide a list,

The purpose of the package is to provide lists, not a single list.

> implemented by an actual list. It's not a "bag" or some other "generic
> container". That would be a at higher level, where the type would be
> "bag" or "generic_container".

Yes, that's why it's a List's Handle (Lists.Handle), something that lets you
manipulate a list without knowing how it's implemented.

--
Jeff Carter
"Why, the Mayflower was full of Fireflies, and a few
horseflies, too. The Fireflies were on the upper deck,
and the horseflies were on the Fireflies."
Duck Soup
95

Re: Unchecked_Deallocation with tagged types

<fcbe3bc7-ff79-4e10-ba9a-1ef669663910n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5105&group=comp.lang.ada#5105

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:21d9:: with SMTP id h25mr4283491qka.70.1619106551001; Thu, 22 Apr 2021 08:49:11 -0700 (PDT)
X-Received: by 2002:a25:1883:: with SMTP id 125mr5498225yby.465.1619106550782; Thu, 22 Apr 2021 08:49:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Thu, 22 Apr 2021 08:49:10 -0700 (PDT)
In-Reply-To: <s5rlv4$3ns$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=35.245.252.196; posting-account=XfA3zgkAAABoz6fRf3Tehtnqqr7Ycml-
NNTP-Posting-Host: 35.245.252.196
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me> <86a6pqk89v.fsf@stephe-leake.org> <s5rlv4$3ns$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fcbe3bc7-ff79-4e10-ba9a-1ef669663910n@googlegroups.com>
Subject: Re: Unchecked_Deallocation with tagged types
From: vincent....@l3harris.com (Vincent Marciante)
Injection-Date: Thu, 22 Apr 2021 15:49:10 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 12
 by: Vincent Marciante - Thu, 22 Apr 2021 15:49 UTC

On Thursday, April 22, 2021 at 7:16:54 AM UTC-4, Jeffrey R. Carter wrote:
> Yes, that's why it's a List's Handle (Lists.Handle), something that lets you
> manipulate a list without knowing how it's implemented.

(Only somewhat tongue-in-cheek )
That seems to imply that any type that is somewhat complicated
would be named handle and most of the important types in large
systems are somewhat complicated types and therefore all of the
important types would be named handle. In source code names,
the difference between a "_" character and a "." character is not
that much, so this style is similar to having to tack "_type" at the
end of all type names: List.Handle and List_Type are both distasteful
to me when all I'd need is List to indicate the nature of the type!

Re: Unchecked_Deallocation with tagged types

<s5vpul$ldb$1@franka.jacob-sparre.dk>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5108&group=comp.lang.ada#5108

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!paganini.bofh.team!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail
From: ran...@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Fri, 23 Apr 2021 19:49:24 -0500
Organization: JSA Research & Innovation
Lines: 29
Message-ID: <s5vpul$ldb$1@franka.jacob-sparre.dk>
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com> <s5gt17$7d0$2@dont-email.me> <s5h167$2f0$1@dont-email.me> <s5h1vv$anq$1@gioia.aioe.org> <s5hic3$nab$1@dont-email.me> <3d6e49b6-f195-4dc2-bf4b-795f18f2da9dn@googlegroups.com> <s5n7va$c83$1@franka.jacob-sparre.dk> <s5ndog$p57$1@dont-email.me> <ie8uagFqaf2U1@mid.individual.net>
Injection-Date: Sat, 24 Apr 2021 00:49:26 -0000 (UTC)
Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226";
logging-data="21931"; mail-complaints-to="news@jacob-sparre.dk"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
 by: Randy Brukardt - Sat, 24 Apr 2021 00:49 UTC

"Niklas Holsti" <niklas.holsti@tidorum.invalid> wrote in message
news:ie8uagFqaf2U1@mid.individual.net...
> On 2021-04-20 23:32, Jeffrey R. Carter wrote:
>> On 4/20/21 8:53 PM, Randy Brukardt wrote:
>>>
>>> 'Free makes more sense in a new language (an Ada follow-on).
>>
>> Right. I don't think it would be a good idea to add it to Ada.
>>
>> But I think a new language should not have pointers at all.
>>
>> No more radical than not having arrays.
>
> It seems to me that a language without arrays and pointers would be very
> difficult to use in an embedded, real-time, close-to-HW context. So we
> would lose the nice wide-spectrum nature of Ada.

It's important that a new language have a way to interface to existing
hardware and software. So there has to be something that maps to C arrays
and pointers (and the equivalent for hardware). But that doesn't necessarily
have to be something that is used outside of interfacing. An Ada example is
Unchecked_Unions -- they exist for interfacing but shouldn't be used
otherwise. A fixed vector type and a raw general access type would do the
trick, but those could be something that are almost never used outside of
interfacing packages.

Randy.

Re: Unchecked_Deallocation with tagged types

<s5vqq9$lou$1@franka.jacob-sparre.dk>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=5109&group=comp.lang.ada#5109

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!paganini.bofh.team!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail
From: ran...@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Fri, 23 Apr 2021 20:04:08 -0500
Organization: JSA Research & Innovation
Lines: 37
Message-ID: <s5vqq9$lou$1@franka.jacob-sparre.dk>
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me> <827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me> <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
Injection-Date: Sat, 24 Apr 2021 01:04:10 -0000 (UTC)
Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226";
logging-data="22302"; mail-complaints-to="news@jacob-sparre.dk"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
 by: Randy Brukardt - Sat, 24 Apr 2021 01:04 UTC

"Vincent Marciante" <vincent.marciante@l3harris.com> wrote in message
news:4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com...
> On Tuesday, April 20, 2021 at 4:57:00 PM UTC-4, Jeffrey R. Carter wrote:
>> On 4/20/21 7:34 PM, Vincent Marciante wrote:
>> >
>> > Lists.List
>>
>> My objection is that this says the same thing twice (hence my joke about
>> adding
>> more variants of "List" to it). "This is a list, and by the way, this is
>> a
>> list." To me, Lists.Handle says, "This is something that lets you
>> manipulate a
>> hidden implementation of lists."
>>
>> But the most important thing, I think, is that you've thought about
>> naming ...
>
> But that idiom pretty much prohibits "using" more than one package with
> such naming:

Yes, of course, that's a feature, not a bug. ;-)

One of the things that I learned when building Claw is that there is no
naming convention that works well for use clauses and for the use-adverse.
We ended up with a scheme that sort of works for both (using _Type) but it
ideal for neither. I'd guess that most authors fall into one or the other
camps and pick a scheme accordingly.

For me, a naming scheme that discourages the use of (package) use clauses is
a bonus. (Such a scheme makes it easier to avoid use clauses.) I personally
only use "use type" in new code (there's tons of old code for which that
doesn't work, of course, but that doesn't change the principle).

Randy.

use clauses

<62560a6b$0$18724$426a74cc@news.free.fr>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6824&group=comp.lang.ada#6824

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp1-2.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: use clauses
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me> <827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me> <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com> <s5vqq9$lou$1@franka.jacob-sparre.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Date: Wed, 13 Apr 2022 01:25:31 +0200
Lines: 24
Message-ID: <62560a6b$0$18724$426a74cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 13 Apr 2022 01:25:32 CEST
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1649805932 news-1.free.fr 18724 91.175.52.121:13907
X-Complaints-To: abuse@proxad.net
 by: Thomas - Tue, 12 Apr 2022 23:25 UTC

In article <s5vqq9$lou$1@franka.jacob-sparre.dk>,
"Randy Brukardt" <randy@rrsoftware.com> wrote:

> For me, a naming scheme that discourages the use of (package) use clauses is
> a bonus. (Such a scheme makes it easier to avoid use clauses.)

I agree to avoid use clauses.

(I personally prefer Lists.List, like Vincent Marciante -
i like Ada.Containers.* naming :-) )

> I personally
> only use "use type" in new code (there's tons of old code for which that
> doesn't work, of course, but that doesn't change the principle).

what do you think about:
- "use all type" clauses?
- List.Clear? (could you remember me how you call that, please?)
- List.Clear does work only if List is tagged?

--
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/

Re: use clauses

<t357jt$v7n$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6825&group=comp.lang.ada#6825

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ran...@rrsoftware.com (Randy Brukardt)
Newsgroups: comp.lang.ada
Subject: Re: use clauses
Date: Tue, 12 Apr 2022 20:05:00 -0500
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <t357jt$v7n$1@dont-email.me>
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me> <827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me> <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com> <s5vqq9$lou$1@franka.jacob-sparre.dk> <62560a6b$0$18724$426a74cc@news.free.fr>
Injection-Date: Wed, 13 Apr 2022 01:05:02 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a863a4ac0777e526b7dfd040fe710118";
logging-data="31991"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZqpJotDm+Z5W5q4qIBrqUTx/reVZt4kU="
Cancel-Lock: sha1:cSZs144YRTIQF+2IUjPfBv2Vleg=
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-Priority: 3
X-MSMail-Priority: Normal
 by: Randy Brukardt - Wed, 13 Apr 2022 01:05 UTC

"Thomas" <fantome.forums.tDeContes@free.fr.invalid> wrote in message
news:62560a6b$0$18724$426a74cc@news.free.fr...
> In article <s5vqq9$lou$1@franka.jacob-sparre.dk>,
> "Randy Brukardt" <randy@rrsoftware.com> wrote:
>
>> For me, a naming scheme that discourages the use of (package) use clauses
>> is
>> a bonus. (Such a scheme makes it easier to avoid use clauses.)
>
> I agree to avoid use clauses.
>
> (I personally prefer Lists.List, like Vincent Marciante -
> i like Ada.Containers.* naming :-) )
>
>
>> I personally
>> only use "use type" in new code (there's tons of old code for which that
>> doesn't work, of course, but that doesn't change the principle).
>
> what do you think about:
> - "use all type" clauses?

This is OK; I don't use them mainly because I only use features implemented
in Janus/Ada, and "use all type" is not yet implemented there.

The fundamental problem with "use" is that it makes everything visible, and
then deals with conflicts by making those things invisible again. That's not
problem for overloadable primitive operations, since the profile is included
and conflicts only occur when someone has made a lousy design choice
(creating a routine with the same name and profile as a primitive) [Most
such conflicts come from maintenance when some existing routine is moved to
be primitive; in such cases, the original routine simply should be removed.]
Since "use all type" only works on overloadable primitives (and things that
work rather like primitives), it's fairly safe. One could make an argument
that primitive operations should always be visible when the type is (that's
not the Ada rule, but argubly it would work better in most circumstances) --
and you should always know to look at primitives anyway when trying to find
something..

> - List.Clear? (could you remember me how you call that, please?)

For tagged types, you can use prefix notation, so "My_List.Clear" is the
easiest. With "use all type List", you can write Clear(My_List). If your
objects have well-choosen names, it's not really needed to have the type
around for such operations, even when use clauses are in place. Thus,
"Clear", not "Clear_List", and that works well even when someone uses
everything in sight (of course, they may have a hard time finding where
Clear is defined when debugging, but that's their choice).

> - List.Clear does work only if List is tagged?

Right. There are a number of semantic issues for untagged types, the main
ones having to do with implicit dereference (which occurs in this notation,
as in any other selected_component notation). If you have a prefix of an
access type, it gets very messy to determine which dereference is which. And
just allowing composite types doesn't work well either: a private type that
is completed with an access type would *lose* operations when it had full
visibility -- that seems pretty weird.

It originally got limited to tagged types as that was easy to do and didn't
have semantic issues. We were going to look at generalizing the prefix
notation again (several people asked about it), but no one made a concrete
proposal and it never went anywhere for Ada 2022.

Randy.

Re: use clauses

<kvKdncavvLiLEcr_nZ2dnUU7-W3NnZ2d@earthlink.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6827&group=comp.lang.ada#6827

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 13 Apr 2022 21:51:02 -0500
Subject: Re: use clauses
Newsgroups: comp.lang.ada
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr>
<s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org>
<s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com>
<s5nf6q$3c4$1@dont-email.me>
<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com>
<s5vqq9$lou$1@franka.jacob-sparre.dk>
<62560a6b$0$18724$426a74cc@news.free.fr> <t357jt$v7n$1@dont-email.me>
From: 25BZ...@nada.net (25.BX944)
Date: Wed, 13 Apr 2022 22:51:01 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <t357jt$v7n$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Message-ID: <kvKdncavvLiLEcr_nZ2dnUU7-W3NnZ2d@earthlink.com>
Lines: 14
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 98.77.165.67
X-Trace: sv3-tK7bs5iF1pN2ZgWiLZPTq7bMoG+XWUG/cp8lj1TYxt6NXFVU78xgm8FpqJUowJQdQHIUqCqpXpDTKaH!KZfifg9j4HMIu6pIKqM3leknIUND0UKuU+Zt8A/rvtr/5UdKtF43OTD1QSEl04BfiyHhktjHKwoi!yxfhp9FdDEt+o0SWu3M=
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2118
 by: 25.BX944 - Thu, 14 Apr 2022 02:51 UTC

After fiddling around with ADA for awhile, I have concluded
that it's Just Not Worth It - too fiddly, TOO obsessed with
exact types and such. While there are SOME few justifications
for that, well, it's just pretty much UNUSABLE. If I need to
use an "old" language, well, FORTRAN is easier to deal with
and I actually *like* Pascal (I write lots of stuff in
Lazarus/FPC even today). And, of course, 'C' ...

So, unless you are somehow OBLIGATED, use something,
anything, but ADA.

Sorry, not what you wanted to hear, but ......

I will now de-subscribe.

Re: use clauses

<81bd7322-7f83-4733-86b7-c8c5b52abed3n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6828&group=comp.lang.ada#6828

 copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:4455:b0:69c:6124:21fe with SMTP id w21-20020a05620a445500b0069c612421femr784538qkp.680.1649918953601;
Wed, 13 Apr 2022 23:49:13 -0700 (PDT)
X-Received: by 2002:a81:5309:0:b0:2e6:dcfc:8665 with SMTP id
h9-20020a815309000000b002e6dcfc8665mr856614ywb.501.1649918953358; Wed, 13 Apr
2022 23:49:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Wed, 13 Apr 2022 23:49:13 -0700 (PDT)
In-Reply-To: <kvKdncavvLiLEcr_nZ2dnUU7-W3NnZ2d@earthlink.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:810:89e0:6de2:76e3:b969:1036;
posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH
NNTP-Posting-Host: 2a01:e0a:810:89e0:6de2:76e3:b969:1036
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org>
<607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me>
<86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me>
<827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me>
<4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com> <s5vqq9$lou$1@franka.jacob-sparre.dk>
<62560a6b$0$18724$426a74cc@news.free.fr> <t357jt$v7n$1@dont-email.me> <kvKdncavvLiLEcr_nZ2dnUU7-W3NnZ2d@earthlink.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <81bd7322-7f83-4733-86b7-c8c5b52abed3n@googlegroups.com>
Subject: Re: use clauses
From: briot.em...@gmail.com (Emmanuel Briot)
Injection-Date: Thu, 14 Apr 2022 06:49:13 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 4
 by: Emmanuel Briot - Thu, 14 Apr 2022 06:49 UTC

On Thursday, April 14, 2022 at 4:51:10 AM UTC+2, 25.BX944 wrote:
> So, unless you are somehow OBLIGATED, use something,
> anything, but ADA.

I fully understand. Can I recommend that you try Whitespace (https://en.wikipedia.org/wiki/Whitespace_(programming_language)) or Basic as your language of choice ? They should not be as bothersome as Ada. Of course, the surprises come at run time !

Re: use clauses

<ir0i5h1ps9pc4ri8lg8glhab0phlrts6cp@4ax.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6829&group=comp.lang.ada#6829

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: doc...@tardis.org (Doctor Who)
Newsgroups: comp.lang.ada
Subject: Re: use clauses
Date: Fri, 15 Apr 2022 07:33:07 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <ir0i5h1ps9pc4ri8lg8glhab0phlrts6cp@4ax.com>
References: <s5gq77$110s$1@gioia.aioe.org> <607bf826$0$3733$426a74cc@news.free.fr> <s5hnta$2qv$1@dont-email.me> <86im4hj6eh.fsf@stephe-leake.org> <s5n2nl$6ee$1@dont-email.me> <827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> <s5nf6q$3c4$1@dont-email.me> <4205785c-6818-4e26-b931-5a775e2c426cn@googlegroups.com> <s5vqq9$lou$1@franka.jacob-sparre.dk> <62560a6b$0$18724$426a74cc@news.free.fr> <t357jt$v7n$1@dont-email.me> <kvKdncavvLiLEcr_nZ2dnUU7-W3NnZ2d@earthlink.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="6631a11706bc6f61d622239becd92d37";
logging-data="32763"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/h20TRotTd2DelCFswRbLl"
User-Agent: ForteAgent/8.00.32.1272
Cancel-Lock: sha1:D1nSwG/oOrBm+si/5clLwk2fdpw=
 by: Doctor Who - Fri, 15 Apr 2022 05:33 UTC

On Wed, 13 Apr 2022 22:51:01 -0400, "25.BX944" <25BZ494@nada.net>
wrote:

>After fiddling around with ADA for awhile, I have concluded
>that it's Just Not Worth It - too fiddly, TOO obsessed with
>exact types and such. While there are SOME few justifications
>for that, well, it's just pretty much UNUSABLE. If I need to
>use an "old" language, well, FORTRAN is easier to deal with
>and I actually *like* Pascal (I write lots of stuff in
>Lazarus/FPC even today). And, of course, 'C' ...
>
>So, unless you are somehow OBLIGATED, use something,
>anything, but ADA.
>
>Sorry, not what you wanted to hear, but ......
>
>I will now de-subscribe.

you are not a programmer.

Re: Unchecked_Deallocation with tagged types

<625a3bb4$0$22256$426a34cc@news.free.fr>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6832&group=comp.lang.ada#6832

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-a.proxad.net!nnrp4-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Unchecked_Deallocation with tagged types
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com> <s5gt17$7d0$2@dont-email.me> <s5h0o5$1piu$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Date: Sat, 16 Apr 2022 05:44:51 +0200
Lines: 42
Message-ID: <625a3bb4$0$22256$426a34cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 16 Apr 2022 05:44:52 CEST
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1650080692 news-4.free.fr 22256 91.175.52.121:2353
X-Complaints-To: abuse@proxad.net
 by: Thomas - Sat, 16 Apr 2022 03:44 UTC

In article <s5h0o5$1piu$1@gioia.aioe.org>,
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:

> On 2021-04-18 11:09, Jeffrey R. Carter wrote:
> > On 4/18/21 10:46 AM, Gautier write-only address wrote:
> >> Side note: did anyone already suggest a new keyword: unchecked_free
> >> and a special statement:
> >>
> >>    unchecked_free Some_Pointer;
> >
> > For every access variable P, there could exist the attribute procedure
> >
> >   P'Free;
>
> I like the idea of attaching it to a variable rather than to type.

why?

if it had to be made, i would say it could not be less than sth like:
T'Unchecked_Free (P)

>
> -------------
> I remember the claim that originally making it a generic procedure with
> an indigestible name was meant as barrier for lazy programmers.

not only that:
i agree J-P. Rosen (he didn't said exactly that),
it's fine to be able to search for the "Unchecked" keyword, to look at
parts of code with some known risk (afaik):
Ada.Unchecked_Deallocation, Ada.Unchecked_Conversion, Unchecked_Access.

> Plus
> some considerations regarding garbage collection lurked in the subconscious.

could you explain, please ? :-)

--
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/

Re: Unchecked_Deallocation with tagged types

<625a4d8a$0$24798$426a34cc@news.free.fr>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6833&group=comp.lang.ada#6833

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!proxad.net!feeder1-2.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp5-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Unchecked_Deallocation with tagged types
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com> <s5gt17$7d0$2@dont-email.me> <s5h167$2f0$1@dont-email.me> <s5h1vv$anq$1@gioia.aioe.org> <s5hic3$nab$1@dont-email.me> <3d6e49b6-f195-4dc2-bf4b-795f18f2da9dn@googlegroups.com> <s5hkl6$9bu$1@dont-email.me> <b37bc687-b72f-4bc4-858c-77dc9b878cffn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Date: Sat, 16 Apr 2022 07:00:57 +0200
Lines: 64
Message-ID: <625a4d8a$0$24798$426a34cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 16 Apr 2022 07:00:58 CEST
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1650085258 news-4.free.fr 24798 91.175.52.121:1646
X-Complaints-To: abuse@proxad.net
 by: Thomas - Sat, 16 Apr 2022 05:00 UTC

In article <b37bc687-b72f-4bc4-858c-77dc9b878cffn@googlegroups.com>,
Gautier write-only address <gautier_niouzes@hotmail.com> wrote:

> > Well, P'Free can also be in another package... Of course, we are talking
> > here only about the direct, actual deallocation.
> >
> > If you want to precisely know where deallocation is used, use AdaControl
> > (for any solution). If you want to be confident that there is no direct
> > deallocation in a module, the generic wins.
>
> It loses because you can have direct, immediate deallocation without the
> "with Ada.Unchecked_Deallocation" somewhere in the context clause.
>
> pack.ads:
>
> with Ada.Unchecked_Deallocation;
> package Pack is
> type IA is access Integer;
> procedure Release is new Ada.Unchecked_Deallocation (Integer, IA);
> end;
>
> ----
> proc.adb:
>
> with Pack;
> procedure Proc is
> use Pack;
> P : IA;
> begin
> P := new Integer;
> Release (P);
> end;

what J-P. Rosen meant was that P'Free could be in the body of
Pack.Release, and then it would not be in Proc either.

perso i like the design with the "generic".
(I'm used to it anyway, although of course it's worse than not needing
explicit Deallocation.)

but the question is: why in the specification ???

actually i need to know more about your case:

- do you find it ok to put the access types in the package
specification, and then not have control over what they become?

- or don't you want that, but you regularly become in situations where
you have no choice (for example because you need components of which you
are not the author)?

what's your opinion about String_Access and Free in
Ada.Strings.Unbounded?

I don't understand what they are doing here, since this package is made
to avoid needing them...

--
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/

Re: Unchecked_Deallocation with tagged types

<t3dtj8$t6$1@gioia.aioe.org>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6834&group=comp.lang.ada#6834

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!hzzNxxMX5IPvnEV4b74Cww.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Unchecked_Deallocation with tagged types
Date: Sat, 16 Apr 2022 10:09:11 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t3dtj8$t6$1@gioia.aioe.org>
References: <607b56f8$0$3721$426a34cc@news.free.fr>
<s5gq77$110s$1@gioia.aioe.org>
<07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com>
<s5gt17$7d0$2@dont-email.me> <s5h0o5$1piu$1@gioia.aioe.org>
<625a3bb4$0$22256$426a34cc@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="934"; posting-host="hzzNxxMX5IPvnEV4b74Cww.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.8.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Sat, 16 Apr 2022 08:09 UTC

On 2022-04-16 05:44, Thomas wrote:
> In article <s5h0o5$1piu$1@gioia.aioe.org>,
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:
>
>> On 2021-04-18 11:09, Jeffrey R. Carter wrote:
>>> On 4/18/21 10:46 AM, Gautier write-only address wrote:
>>>> Side note: did anyone already suggest a new keyword: unchecked_free
>>>> and a special statement:
>>>>
>>>>    unchecked_free Some_Pointer;
>>>
>>> For every access variable P, there could exist the attribute procedure
>>>
>>>   P'Free;
>>
>> I like the idea of attaching it to a variable rather than to type.
>
> why?

Because operations apply to objects not to
the types of.

> if it had to be made, i would say it could not be less than sth like:
> T'Unchecked_Free (P)

This does as little sense as T'Image did.

>> I remember the claim that originally making it a generic procedure with
>> an indigestible name was meant as barrier for lazy programmers.
>
> not only that:
> i agree J-P. Rosen (he didn't said exactly that),
> it's fine to be able to search for the "Unchecked" keyword, to look at
> parts of code with some known risk (afaik):
> Ada.Unchecked_Deallocation, Ada.Unchecked_Conversion, Unchecked_Access.

You can search for "Free" as easily.

Furthermore, the way unchecked stuff breaks the program is such that the
actual problem is almost never located at the place where you call
something unchecked. The error is usually triggered in a different place.

>> Plus
>> some considerations regarding garbage collection lurked in the subconscious.
>
> could you explain, please ? :-)

You allocate objects at will and the language per magic wand frees them
for you someway someday. This anything that works in a non-magical way
(read: deterministic, predictable, explicit) is so outrageous that must
be highlighted as "unchecked." (:-))

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Unchecked_Deallocation with tagged types

<625cc411$0$18748$426a34cc@news.free.fr>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=6836&group=comp.lang.ada#6836

 copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp1-2.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Unchecked_Deallocation with tagged types
References: <607b56f8$0$3721$426a34cc@news.free.fr> <s5gq77$110s$1@gioia.aioe.org> <07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com> <s5gt17$7d0$2@dont-email.me> <s5h167$2f0$1@dont-email.me> <s5h1vv$anq$1@gioia.aioe.org> <s5hic3$nab$1@dont-email.me> <3d6e49b6-f195-4dc2-bf4b-795f18f2da9dn@googlegroups.com> <s5n7va$c83$1@franka.jacob-sparre.dk> <s5ndog$p57$1@dont-email.me> <ie8uagFqaf2U1@mid.individual.net> <s5vpul$ldb$1@franka.jacob-sparre.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Date: Mon, 18 Apr 2022 03:51:13 +0200
Lines: 77
Message-ID: <625cc411$0$18748$426a34cc@news.free.fr>
Organization: Guest of ProXad - France
NNTP-Posting-Date: 18 Apr 2022 03:51:14 CEST
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1650246674 news-4.free.fr 18748 91.175.52.121:14014
X-Complaints-To: abuse@proxad.net
 by: Thomas - Mon, 18 Apr 2022 01:51 UTC

In article <s5vpul$ldb$1@franka.jacob-sparre.dk>,
"Randy Brukardt" <randy@rrsoftware.com> wrote:

> "Niklas Holsti" <niklas.holsti@tidorum.invalid> wrote in message
> news:ie8uagFqaf2U1@mid.individual.net...
> > On 2021-04-20 23:32, Jeffrey R. Carter wrote:
> >> On 4/20/21 8:53 PM, Randy Brukardt wrote:
> >>>
> >>> 'Free makes more sense in a new language (an Ada follow-on).
> >>
> >> Right. I don't think it would be a good idea to add it to Ada.
> >>
> >> But I think a new language should not have pointers at all.
> >>
> >> No more radical than not having arrays.
> >
> > It seems to me that a language without arrays and pointers would be very
> > difficult to use in an embedded, real-time, close-to-HW context. So we
> > would lose the nice wide-spectrum nature of Ada.

i like "the nice wide-spectrum nature of Ada" :-)
If I got it right, it is the thickness*, that is, it goes both far in
low level and far in high level.

* Natacha Porte, https://www.youtube.com/watch?v=b5lRyBRk0d8&t=430s
(during 1:10 - sorry, it's only in french)

>
> It's important that a new language have a way to interface to existing
> hardware and software. So there has to be something that maps to C arrays
> and pointers (and the equivalent for hardware). But that doesn't necessarily
> have to be something that is used outside of interfacing. An Ada example is
> Unchecked_Unions -- they exist for interfacing but shouldn't be used
> otherwise.

i don't know much "exotic things" (for me) like embedded or real-time
programming,
but i would not take the risk to exclude users who need low level in
various cases (not only in interfaces),
so i think it would be better to keep a full thickness with the ability
to go far in low level at any place it is considered usefull.

> A fixed vector type and a raw general access type would do the
> trick, but those could be something that are almost never used outside of
> interfacing packages.

an other point here, is the ability to create new structures that could
be considered as "basic" later.

for example Ada.Containers.Multiway_Trees seems to be based on
Ada.Containers.Doubly_Linked_Lists,
and i don't know if it could be needed / usefull to have trees based on
Ada.Containers.Vectors,
but based on Ada.Containers.Ordered_Maps, certainly!

and sometimes using other high level data structures would be enough,
but probably sometimes it would be non-optimal, and maybe, in the worst
case, it could be impossible (especially in the event that we had not
foreseen all the needed high level data structures)

so, i think:

- we could keep arrays as is, no matter if they are rarly used.

- for access types, it would be nice to find a kind of "controlled
access type" that allows:
- to access the "raw general access type", as low level type,
when needed,
- to need not Unchecked_Deallocation, making automatic Deallocation,
- and which would not be too much high level
(for example Ada.Containers.Indefinite_Holders is fine).

--
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/

Pages:123
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor