This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: new __cxa_demangle


Mark Mitchell <mark at codesourcery dot com> writes:

| --On Wednesday, February 19, 2003 06:31:04 PM -0600 Benjamin Kosnik
| <bkoz at redhat dot com> wrote:
| 
| >
| >> FWIW, it would be nice to have a demangler that other implementations
| >> of the C++ Standard library could use :)
| >
| > You already do: libiberty/cp-demangle.c. You might want to look at it.
| >
| > Sorry, you have not persuaded me. I'd like to try this new
| > implementation out.
| 
| I think it's a mistake to do a new implementation in C++.

I beg to differ.

| 
| I think that the demangler should be written in C as an independent
| module so that it can be used in programs that are not written in C++.
| And I think that having two demanglers just makes things worse; now
| they can be out of synch in all sorts of weird ways.

While I recognize of the out-of-sync danger of having two independent
implementations, it is a mistake to force a C implementation of the
demangler on every body.  This message is not a religious matter.

The C interface contains plenty of C ways of building interfaces that
just don't catch on and are very inconvenient to work with.  C++ can
support foreign languages in both directions, so the argument that the
demangler should be written in C in order to be used by other modules
not written in C++  is unconvincing.

Maybe, we should find ways to have both demanglers in sync, but
forcing a unique C implementation is wrong.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]