[SAGA-RG] Context and Session thoughts

Ceriel Jacobs ceriel at cs.vu.nl
Wed Feb 25 08:49:18 CST 2009


Andre Merzky wrote:
> Quoting [Ceriel Jacobs] (Feb 25 2009):
>>>  saga::context c ("globus");
>>>
>>>  c.set_defaults ();
>>>
>>>  // get info about default globus proxy
>>>  std::cout << c.get_attribute ("LifeTime");
>>>  std::cout << c.get_attribute ("UserID");
>>>  std::cout << c.get_attribute ("VO");
>>>
>>> without set_defaults, it is totally undefined when these
>>> attributes are available.
>> After calling the constructor? As would be the case for
>> the SAGA 1.0 specs?
> 
> As said: calling set_defaults in the constructor cannot
> possibly stay in the spec: that breaks in those cases where
> set_defaults would throw.  If the c'tor then throws for a
> given type, you can't create any context of that type _at_
> _all_.

That's one reason why I think set_defaults should not be in the API,
and should not throw. Instead, the constructor should set suitable
defaults, if it can. If it does not recognize the Type, it can throw
an exception, but only then. Other errors will turn up when
the context is used.

>>> One can very likely achieve a consistent API w/o
>>> set_defaults, by defining a couple of semantic changes
>>> which address the issues above explicitely, no doubt.  I
>>> just don't think (a) that this is justified, and (b) that
>>> this would really simplify matters.
>> But I think the CURRENT changes with respect to SAGA 1.0
>> are much bigger.
> 
> Hmm, you mean the ones we have in the errata I assume?  Yes,
> some of them are bigger.  However, they are there to fix
> errors.

No, I mean the change that set_defaults is not to be called anymore
from the constructor. That is quite a big change, that may affect
all SAGA applications. I don't know if SAGA applications usually
call set_defaults(), since SAGA 1.0 specifies that it is called
from the constructor, if a Type is specified.

 >> O well, I think I have vented my opinion enough for now
 >> ...

 > Hmm, would you mind if we discuss that on the phone?  I
 > agree that we are running in circles somehow, but I would
 > like to get the discussion to a conclusion one way or the
 > other, instead of leaving it open...  Can I call you
 > somewhere?

Of course you can call me, you know the number (since it was
yours as well for a while :-) But this is not just between you and me,
although it may seem that way now. We both live in European time:-)
Maybe this discussion prompts some more opinions.

Cheers,		Ceriel




More information about the saga-rg mailing list