Fwd (kielmann@cs.vu.nl): Fwd (craig@rush.aero.org): Re: [saga-rg] deep copy / shallow copy

From: Craig Lee <craig@rush.aero.org> Subject: Re: [saga-rg] deep copy / shallow copy
But, one could argue that when programming in a given language, the copy/assignment operator will be used for both SAGA and non-SAGA objects. That is to say, the programmer should be/will be aware of the copy/assignment semantics throughout the program.
Nicely put, Craig! That's what I tried to say...
I agree that differing copy/assignment semantics could cause problems for a programmer, but I don't see how a SAGA binding could dictate copy/assignment semantics that are different from a language's "native" semantics. Besides being difficult or impossible to implement, this means that different objects within a single program could have different copy/assignment behavior, depending on whether they were SAGA or non-SAGA objects. This, too, could cause problems.
I think this should be left as a language binding issue. Nonetheless, the SAGA API doc could have a prominent "Advice to Practitioners" section that identifies and discusses these binding pitfalls.
Sounds right to me. Thilo -- Thilo Kielmann http://www.cs.vu.nl/~kielmann/

Quoting [Thilo Kielmann] (Sep 12 2005):
Subject: Re: [saga-rg] deep copy / shallow copy
But, one could argue that when programming in a given language, the copy/assignment operator will be used for both SAGA and non-SAGA objects. That is to say, the programmer should be/will be aware of the copy/assignment semantics throughout the program.
Nicely put, Craig! That's what I tried to say...
I agree.
I agree that differing copy/assignment semantics could cause problems for a programmer, but I don't see how a SAGA binding could dictate copy/assignment semantics that are different from a language's "native" semantics.
The question is if there are language native semantics for these - from what I learned, there are no clear conventions. So, yes, we could leave that to the language bindings. But it might make sense to add a statement to the general spec such as: "unless defined otherwise by the language bindings, copy and assignement operators will perform a shallow copy" or so.
Besides being difficult or impossible to implement, this means that different objects within a single program could have different copy/assignment behavior, depending on whether they were SAGA or non-SAGA objects. This, too, could cause problems.
I think this should be left as a language binding issue. Nonetheless, the SAGA API doc could have a prominent "Advice to Practitioners" section that identifies and discusses these binding pitfalls.
Sounds right to me.
Right, that probably is the same at the end. Thanks, Andre.
Thilo
-- +-----------------------------------------------------------------+ | Andre Merzky | phon: +31 - 20 - 598 - 7759 | | Vrije Universiteit Amsterdam (VU) | fax : +31 - 20 - 598 - 7653 | | Dept. of Computer Science | mail: merzky@cs.vu.nl | | De Boelelaan 1083a | www: http://www.merzky.net | | 1081 HV Amsterdam, Netherlands | | +-----------------------------------------------------------------+
participants (2)
-
Andre Merzky
-
Thilo Kielmann