--- Comment #6 from Mike Franklin <> ---
(In reply to Rainer Schuetze from comment #5)
> Here's a simpler test case:
> module betterc;
> enum b = typeid(size_t) is typeid(uint);

At under the "Not Available" section:

> 2. TypeInfo and ModuleInfo

So, it is by design that any call to `typeid` is going to fail when compiled
with `-betterC`.

This specific issue is about not being able to use `format` in `-betterC`. 
Perhaps the reason for that is because `format` relies on runtime type
information (i.e. TypeInfo).  So the solution, specific to this issue, would
not be allow uses of `typeid` in `-betterC`, but rather to remove the
dependency of `format` on runtime type information (if that's even possible).  

D has excellent facilities for doing introspection at compile-time, so it may
be possible to look to those facilities in concert with templates to find a
solution that does not rely on runtime type information.

It would likely also help to begin replacing compiler-generated calls to
runtime hooks that depend on `TypeInfo` with templates.  

See also$2hc$


Reply via email to