comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Need a way to convert a constant to a variable
Date: Sat, 5 Aug 2017 22:12:09 +0200
Date: 2017-08-05T22:12:09+02:00	[thread overview]
Message-ID: <om58j2$2nm$1@dont-email.me> (raw)
In-Reply-To: <om4ri3$1se8$1@gioia.aioe.org>

On 08/05/2017 06:25 PM, Victor Porton wrote:
> 
> Your code allocates a new string which requires to be freed later.
> 
> I want a function, which would return a pointer to the (not necessarily nul-
> terminated) string hold in the indefinite holder, so that deallocation would
> be not required and code would be more efficient (not requiring to copy the
> char_array).

You made a proposal to the ARG, and I showed that the problem in that proposal 
that you claim cannot be solved with the existing language can be. The ARG 
aren't going to look at the problem you have in your mind, they're going to look 
at the problem in your proposal. Since it can be so solved, the ARG will reject it.

But even if you clean it up to include all your internal requirements I still 
think it won't fly. Ada is a safe language, and a blatantly unsafe feature such 
as you are requesting will only be considered if it is applicable to a large set 
of real problems. Not only that, but you'll need to show that this large set of 
real problems has many with real size and timing requirements that can't be met 
using my solution. In other words, all your requirements must be realistic, not 
premature optimization. The ARG is going to need be told why in these problems 
the functions can't have an in-out parameter, for example.

So I think your proposal will fail on that count.

Furthermore, your only example uses a container from the standard library. The 
containers are intended to be general purpose and safe. They are not expected to 
be usable for every problem. So your large set of real problems will have to 
have this problem not in connection with the containers. Otherwise they'll say 
that if the containers are not suitable for your problem, don't use them.

Even if you can show all this, I still think it won't fly, because I know a way 
to do what you want within the existing language.

I suggest your effort would be better spent considering alternative designs.

-- 
Jeff Carter
"He didn't get that nose from playing ping-pong."
Never Give a Sucker an Even Break
110

---
This email has been checked for viruses by AVG.
http://www.avg.com

  reply	other threads:[~2017-08-05 20:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-05 13:41 Need a way to convert a constant to a variable Victor Porton
2017-08-05 14:48 ` Dmitry A. Kazakov
2017-08-05 15:11   ` Victor Porton
2017-08-05 16:44     ` Dmitry A. Kazakov
2017-08-05 17:45       ` Victor Porton
2017-08-05 19:37         ` Dmitry A. Kazakov
2017-08-05 15:41 ` Jeffrey R. Carter
2017-08-05 16:25   ` Victor Porton
2017-08-05 20:12     ` Jeffrey R. Carter [this message]
2017-08-05 17:59 ` Per Sandberg
2017-08-15 20:05 ` Eryndlia Mavourneen
2017-08-15 20:07   ` 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