[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: type_info::name question
From:       kunert () physik ! tu-dresden ! de
Date:       1998-09-21 12:10:13
[Download RAW message or body]


--simple boundary
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Description: "cc:Mail Note Part"

Alexandre Oliva wrote:
> 
> Thomas Kunert <kunert@physik.tu-dresden.de> writes:
> 
> > IMHO, type_info::name isn't useful at all if it returns some cryptic
> > string.
> 
> type_info::name *isn't* useful at all, as defined in the standard.  

Only if one clings to the paper as you do. 
The function is called `name', not `some_arbitrary_string'. IMO, that is
description enough. 

``Implementation defined'' doesn't mean ``as unuseful as possible to
prevent portability problems'' but ``make the best of it, everybody
should know about portability''. And if the function does what it's name
suggests -- giving the name of the type in some readable language -- it
*is* useful.

> If you really want a readable representation,
> I've already explained that it's just a matter of running c++filt or
> embedding it into your application.

Of course I can do that, in fact I have done this a long time ago, to
port some perfectly working code to egcs, but I hate rewriting functions
from the standard library only because of some weird chosen
implementation defined values.

Regards, 
Thomas



--simple boundary--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic