Re: [eigen] API change proposal

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


I agree with Patrick; as in what I have encountered so far, const (reference/pointer) always meant the object won't be modifed, non-const (reference/pointer) meant the object is potentially modified, thereby signaling this is an output argument. Insofar there is (for me) no difference between pointer and reference.

Markus

> Von: "Patrick Mihelich" <patrick.mihelich@xxxxxxxxx>
> I agree with Markus. Even ignoring the naming (ResultType, result), 
> the fact that the reference is non-const signals that it is an output 
> of the function.
> 
> Patrick
> 
> On Wed, Jul 22, 2009 at 3:30 PM, Andrea Arteaga <yo.eres@xxxxxxxxx> 
> wrote:
> In principle, I'm agree with Markus, since pointers in C++ can be 
> considered as low-level concept
> and Eigen allows a high-level manipulation of objects; that pointers 
> could be "out of place".
> 
> But: when a method of LU (or QR) takes a reference as argument, is it 
> clear to users that the
> function will modify that argument? Pointers are the classical system 
> to output something, which
> cannot be the return value. In spite of the practicality of 
> references, pointers make clear that the
> argument is a "output argument", not an input one.
> 
> However, Eigen could also provide both behaviours by overloading the 
> method.
> 
> Andrea Arteaga
> 
> 
> 


________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/