comp.lang.ada
 help / color / mirror / Atom feed
From: Jerry <lanceboyle@qwest.net>
Subject: Re: ANN: PLplot plotting library with Ada bindings
Date: Fri, 4 Oct 2013 16:55:48 -0700 (PDT)
Date: 2013-10-04T16:55:48-07:00	[thread overview]
Message-ID: <9006bf4b-e682-4803-a5e3-b0363ecb61d1@googlegroups.com> (raw)
In-Reply-To: <l2fqc5$jvh$1@dont-email.me>

On Tuesday, October 1, 2013 5:45:57 PM UTC-7, Jeffrey Carter wrote:
> On 10/01/2013 05:31 PM, Jerry wrote:
> >
> > withPLplot;
> > usePLplot;
> > procedure Simple_Example is
>  >     ...
> > begin
> >     Initialize_PLplot; -- Call this only once.
> 
> Why doesn't the elaboration of Plplot do this?

In some scenarios of PLplot usage, some set-up (i.e., other PLplot calls) is required before Initialize_Plot is called. Of course, this is a matter of how the C library is designed, not the Ada bindings.

>  >     ...
> >     End_PLplot;        -- Call this only once.
> 
> Why not use finalization to do this?

I don't think there are any issues analogous to the above. I might look into this; I think in the past I said, well if the user has to initialize, s/he might as well be bothered to finalize. I don't think it would be confusing to a user to be forced to explicitly initialize but not to explicitly finalize. I don't know what happens if the library doesn't get finalized but it probably ties up resources so an automatic process would be wise in that sense. OTOH, with an opportunity to explicitly do the finalization, the user has the option to free those resources at a more optimal time. So the best design might be to provide both finalization mechanisms.

Jerry
> 
> -- 
> Jeff Carter
> "This school was here before you came,
> and it'll be here before you go."
> Horse Feathers
> 48

  parent reply	other threads:[~2013-10-04 23:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02  0:31 ANN: PLplot plotting library with Ada bindings Jerry
2013-10-02  0:45 ` Jeffrey Carter
2013-10-03  4:39   ` Anatoly Chernyshev
2013-10-03  5:27     ` Jeffrey Carter
2013-10-04 23:55   ` Jerry [this message]
2013-10-19  2:27     ` Randy Brukardt
2013-10-22  4:20       ` Jerry
2013-11-12 15:27 ` Graham Stark
2013-11-13 22:51   ` Jerry
2013-11-15  5:16   ` Jerry
2013-11-18 15:11     ` Graham Stark
replies disabled

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