This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: Register group proposal
- To: 'Jim Kleck' <jim dot kleck at NetergyNet dot COM>, Andrew Cagney <ac131313 at cygnus dot com>
- Subject: RE: Register group proposal
- From: Bernard Dautrevaux <Dautrevaux at microprocess dot com>
- Date: Wed, 28 Feb 2001 10:41:02 +0100
- Cc: Nick Duffek <nsd at redhat dot com>, Bernard Dautrevaux <Dautrevaux at microprocess dot com>, gdb at sources dot redhat dot com, insight at sources dot redhat dot com
> -----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
--------------------------------------------