comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: [Spark] Arrays of Strings
Date: Thu, 10 Apr 2003 13:32:55 -0500
Date: 2003-04-10T13:32:55-05:00	[thread overview]
Message-ID: <v9be5b1o72e150@corp.supernews.com> (raw)
In-Reply-To: 1049989859.683662@master.nyc.kbcfp.com

Hyman Rosen wrote in message <1049989859.683662@master.nyc.kbcfp.com>...
>Lutz Donnerhacke wrote:
>> How do I do this in a Spark frontend? Of course, I can hide the whole
>> program, but this is not really a solution.
>
>"Doctor, it hurts when I do that."
>"Then don't do that!"
>
>Why have you chosen to work in a language which deliberately
>prevents you from expressing what you explicitly need to do?


I hate to do it, but I have to agree with Hyman here.

There is no way to make the code directly interfacing with C any safer
than the underlying C, and that is never going to be anywhere near the
standards of Spark.

What has to be done in cases like this is to write an appropriate thick
wrapper that IS espressible in Spark, and then the ugly interfacing code
has to be in 'real' Ada with the Spark checking turned off.

I don't use Spark, but the Prog_Call function of Janus/Ada (which of
course calls one of the exec functions) has an interface like:

      function Prog_Call (Program_Name : in String;
                                        Command : in String;
                                        Wait : Boolean := True);

and all of the ugly pointer stuff needed to implement that interface is
hidden in the body of the package.

Abstracting the environment variable stuff will be hard (if you actually
need that; it's rare -- Prog_Call just passes null, which is a copy of
the caller's for Windows, I forget what Unix does with that), but I
don't think you have any choice in order to make proper Spark.

The overhead of such a wrapper can be reduced by in-lining and the like,
but it hardly can matter: exec functions are a lot slower than large
volumes of Ada code, and we're certainly not talking about that.

                 Randy.






  reply	other threads:[~2003-04-10 18:32 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 12:02 [Spark] Arrays of Strings Lutz Donnerhacke
2003-04-08 18:08 ` Martin Krischik
2003-04-09  9:23   ` Lutz Donnerhacke
2003-04-09 12:38     ` Hyman Rosen
2003-04-09 12:47       ` Vinzent Hoefler
2003-04-09 14:27         ` Hyman Rosen
2003-04-09 15:13           ` Vinzent Hoefler
2003-04-09 17:21         ` Hyman Rosen
2003-04-09 18:41           ` Vinzent Hoefler
2003-04-09 21:04           ` Randy Brukardt
2003-04-10 23:21           ` John R. Strohm
2003-04-11 12:19             ` Hyman Rosen
2003-04-11 13:14               ` John R. Strohm
2003-04-09  7:50 ` Eric G. Miller
2003-04-09  8:10   ` Lutz Donnerhacke
2003-04-09 18:23   ` Matthew Heaney
2003-04-09 17:42 ` Matthew Heaney
2003-04-09 21:06   ` Randy Brukardt
2003-04-10  8:23   ` Lutz Donnerhacke
2003-04-10 14:09     ` Matthew Heaney
2003-04-10 14:48       ` Hyman Rosen
2003-04-11  6:20         ` Chad R. Meiners
2003-04-11 12:31           ` Hyman Rosen
2003-04-11 18:27             ` Chad R. Meiners
2003-04-11  7:35         ` Phil Thornley
2003-04-11 12:05           ` Marin David Condic
2003-04-11 13:19             ` John R. Strohm
2003-04-12 23:09               ` Robert A Duff
2003-04-11 18:47             ` Chad R. Meiners
2003-04-12 23:51         ` Robert A Duff
2003-04-13  5:47           ` Hyman Rosen
2003-04-14  8:05             ` Lutz Donnerhacke
2003-04-10 15:02       ` Lutz Donnerhacke
2003-04-10 15:50         ` Hyman Rosen
2003-04-10 18:32           ` Randy Brukardt [this message]
2003-04-11  6:28         ` Chad R. Meiners
2003-04-11  8:11           ` Lutz Donnerhacke
2003-04-11 12:32 ` Rod Chapman
2003-04-11 14:50   ` Peter Amey
2003-04-11 18:41   ` Matthew Heaney
2003-04-11 21:25     ` Chad R. Meiners
2003-04-12 10:08     ` Peter Amey
replies disabled

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