This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: FYI: A new C++ demangler


cagney wrote:


[...]

> Could someone fix the old demangler, or write a new one in
> plain C (or re-write the C++ one in C)?  Pretty please?


Yes. There's no reason for the underlying demangler algorithm to be implemented in vanila ISO C 90, and then wrap it for the C++ side. [...]


You might be accused of dogmatic monolingualism if you don't accept
the notion that some such code may be more naturally expressed in a
higher level language -- that could be one such reason.  Another
reason of course is the fact that it is already done and working:
rewriting costs new effort.

High level language? I guess that rules out C++ then :-)


(Note that I'm not asserting that the former reason applies strongly
here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to
rely much on the C++ language's extra capabilities.)

That was my, and I'm guessing Marks, point.


Andrew

--- Begin Message ---
cagney wrote:

> [...]
> > Could someone fix the old demangler, or write a new one in
> > plain C (or re-write the C++ one in C)?  Pretty please?
> 
> Yes.  There's no reason for the underlying demangler algorithm to be
> implemented in vanila ISO C 90, and then wrap it for the C++ side.
> [...]

You might be accused of dogmatic monolingualism if you don't accept
the notion that some such code may be more naturally expressed in a
higher level language -- that could be one such reason.  Another
reason of course is the fact that it is already done and working:
rewriting costs new effort.

(Note that I'm not asserting that the former reason applies strongly
here; libstdc++-v3/include/bits/demangle.h for example doesn't seem to
rely much on the C++ language's extra capabilities.)

- FChE


--- End Message ---

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