grauzone Wrote:

> Brad Roberts wrote:
> > On 1/11/2010 11:20 PM, grauzone wrote:
> >> g wrote:
> >>> Hi
> >>> Is there a way to demangle .mangleof strings at CTFE
> >>> or at least know the fully qualified name of a class or template
> >>> instance.
> >> If you have to use such dirty tricks, you probably should consider to
> >> turn back NOW for your own good. D always lures you into doing tricky
> >> template and CTFE stuff, and then you end up either in compiler bugs or
> >> other dead ends.
> > 
> > And how do bugs get fixed?  Step one is finding them.. which typically 
> > involves
> > writing code that uses the features.  Secondarily, a good number of bugs 
> > have
> > been fixed over the last couple months, so re-exploring the area might well 
> > bear
> > good fruit.
> > 
> > Anyway, doom and gloom pronouncements like this aren't particularly helpful.
> 
> Some types of bugs just never seem to disappear: when one specific bug 
> got fixed, a regression occurs and you have a similar bug. (This 
> happened with forward references in the current dmd release.)
> 
> Nothing wrong with a warning.
> 
> > That said, demangling a symbol and using that inside compile time 
> > expressions
> > does sound like one good definition of hell, regardless of how well it 
> > works.
> 
> Exactly. The thing is just (and that I wanted to say in my previous 
> post): you get easily fascinated by the possibilities, but then either 
> the language or dmd hit an unexpected barrier and fail. Then you start 
> hacks by throwing heaps of CTFE and mixins on the problem, or stuff like 
> parsing .mangleof. I believe choosing a simpler solution instead 
> (although it's boring in terms of hacking) is better.
> 
> > Later,
> > Brad

well, but is there a way to get by other means  the fully qualified name of a 
class for use to a mixin
(is a project for automatic generation of lua bindings)

Reply via email to