Closest Common Type

BCS ao at pathlink.com
Sat May 17 16:05:33 PDT 2008


Reply to Manfred,

> BCS wrote:
> 
>> with a little insight from #D:
>> 
> [...]
> 
> Would you please describe your (hopefully) real world case of usage.
> 
> I beg for this, because your algorithm has a worst case lower bound
> for
> the run time of
> |   Omega( n * N)
> and---if N is fixed---the fastet algorithm has a worst case lower
> bound
> for the runtime of
> |   Omega( n + N);
> where n is the number of queries to the derivation tree and N is the
> number of nodes in the derivation tree.
> -manfred
> 

It's part of my dparse engine. As it is each parse function returns a PObject 
that the user than has to downcast to whatever it should be, I want to have 
the parse function compute the most derived type that it can return based 
on the types returned form the different options.




More information about the Digitalmars-d-learn mailing list