On 17.03.2013 06:00, Flávio Etrusco wrote:
On Sun, Mar 17, 2013 at 12:16 AM, Daniel Gaspary <dgasp...@gmail.com> wrote:
On Sun, Mar 17, 2013 at 12:07 AM, 印場 乃亜 <shir...@galapagossoftware.com> wrote:
On 2013/03/17, at 11:37, Flávio Etrusco <flavio.etru...@gmail.com> wrote:
Daniel, I find this hack as ingenious as atrocious ;-)
But thinking about it a bit, when FPC gets generic methods you can
make this kind of workable!

I was thinking about this, not specifically generic methods, but some
new generic resource.

Indeed. What I was thinking would actually need generic functions,
bounded generics and generics with type-erasure ;-)
So you'd write, say:

   type generic TAlias1<T: TObject> = class(TObject)
     function Alias1: T;
   end;


This already works.

  function<T: TObject> Alias1(Source: T): TAlias1<T>;

I don't really get what you want to express with that...

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to