Results 1 to 10 of 21

Thread: Difference between FPC Generics and Delphi Generics?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    I will probably only use them for list-like datastructures. It's really handy if you don't have to copy the same code for integers, floats, 2d, 3d and 4d vectors.

    Btw, is it possible to use Type Parameter bounds, like java has? It means that you can enforce that your type-parameter T must be a derivative of a specific class, like this:

    Code:
    public class SomeGenericClass <T extends OtherClass> {
        //....
    }
    Last edited by chronozphere; 05-01-2011 at 09:54 AM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •