From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernard Dautrevaux To: 'Jim Kleck' , Andrew Cagney Cc: Nick Duffek , Bernard Dautrevaux , gdb@sources.redhat.com, insight@sources.redhat.com Subject: RE: Register group proposal Date: Wed, 28 Feb 2001 01:59:00 -0000 Message-id: <17B78BDF120BD411B70100500422FC6309E21B@IIS000> X-SW-Source: 2001-q1/msg00254.html > -----Original Message----- > From: Jim Kleck [ mailto:jim.kleck@NetergyNet.COM ] > Sent: Tuesday, February 27, 2001 7:32 PM > To: Andrew Cagney > Cc: Nick Duffek; Dautrevaux@microprocess.com; gdb@sources.redhat.com; > insight@sources.redhat.com > Subject: Re: Register group proposal > > > A consistent interface is *one* reason to have a particular interface. > However, it is not the only thing to consider, nor have the "style > advantages and disadvantages" been fully explored... at least not > in this forum. > > I would note that "struct blah *" is NOT fully opaque. Its > very use implies > a control structure of some sort, and it is quite different > from the standard > types provided by the language. Thus it is not using the full > "extensability" > of the language. > > An alternative I have not seen discussed is to have "typedef > void * blah" > as the public interface (then the implementation would need to cast > the object to the internal representation before operating on it). > > Finally, in the "LONGEST" example, why replace "a = b + c;" with > "a = add(b, c);". My inclination would be to overload the "+" so that > no change to the users of the type are necessary. > I'm afraid GDB is written in C isn't it? so overloading '+' is not really an option. Regards, Bernard -------------------------------------------- Bernard Dautrevaux Microprocess Ingenierie 97 bis, rue de Colombes 92400 COURBEVOIE FRANCE Tel: +33 (0) 1 47 68 80 80 Fax: +33 (0) 1 47 88 97 85 e-mail: dautrevaux@microprocess.com b.dautrevaux@usa.net --------------------------------------------