[Mono-list] today's patch
Ravi Pratap M
22 Oct 2001 10:42:44 +0530
On Mon, 2001-10-22 at 01:57, Miguel de Icaza wrote:
> Every time we are query for interfaces on a type T we would create
> an array of the interfaces and then scan it (I had a similar problem
Yeah, I was wondering myself that it did seem like there was too much
overhead out there.
> I think in this case we could do the same, we care about the output
> of the above routine as `Does it implement the interface or not', so I
> suggest that we change the above code to be:
> if (TypeManager.Implements (expr_type, target_type))
> return new EmptyCast (expr, target_type);
> return null;
> Then we can make `TypeManager.Implements' keep a static hashtable
> that caches the result. You can see an example in
> expression.cs::Indexers class.
Yes, this sounds much more sensible. I shall implement this as soon as
I am done with my shower etc :-)
What are your thoughts on the attributes issue I sent you mail about ?
"If you're smart, you'll be humble. There always is somebody
who hasn't read a book and knows twice as much as you do."
-- David Duchovny in Readers' Digest
Ravi Pratap M <firstname.lastname@example.org>