On 2013-03-06 13:13, Alexander Klenin wrote:
On Wed, Mar 6, 2013 at 10:00 PM, Michael Schnell <mschn...@lumino.de> wrote:
On 03/05/2013 05:17 PM, Alexander Klenin wrote:
1) Make sure "is" and "as" work with generic types -- maybe they already
are?
"is" the generic type and/or "is" a certain specialization ?
Yes, and also generic parameters.

procedure TGenegic<T>Proc;
begin
   if T is String then ...
end;

And, from then on, we're going to have to typecast each and every occurence of T..

Even if this was possible for every type of T, I wonder how doing that affects the performance of generics.

That's why I like the idea of passing compiler directives to generics to help eliminate parts of code (from the generic implementation) during compile-time.


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to