Generics Vote

From Free Pascal wiki
Jump to navigationJump to search

Please add your signature in one of two categories below (add a line "* ~~~~"). Look here for examples. Please add small explanation if you vote for other.

Vote for <> syntax

  • Bram 14:14, 9 Nov 2005 (CET)
  • Gadnio 18:15 28 Nov 2005 (GMT+2)
  • Wanderlan 15:26, 7 November 2006 (CET). See another example already implemented in Object Pascal at Chrome Syntax. Simple, Clean and Elegant. With out unnecessary reserved words as Generic and Specialize. Perhaps Delphi follow this syntax. An another option use '()' instead '<>' for more Pascal compliance (No C-ism), similar to Schema Types (Generics Pascalism) in Extended Pascal (ISO-10206) and GNU Pascal.

    FPC's generics are actually more than the simply generics implemented by .Net languages. FPC's implementation is more like C++ templates which are much more powerful though they has been limited to avoid the ugliest C++ styled template hacking --FPK 20:25, 7 November 2006 (CET)

  • dr_evil 05:25 30 Dec 2006 (GMT+1)
  • Implementation 11:08, 01 Nov 2010 (CET)

Vote for adding generic keyword

  • Neli 13:48, 9 Nov 2005 (CET)
  • Almindor 14:38, 9 Nov 2005 (CET)
  • MvC 14:38, 9 Nov 2005 (CET) Note: done by Almindor per request
  • Marcov 14:48, 9 Nov 2005 (CET). "template" might be better
  • Msmat 15:29, 9 Nov 2005 (CET)
  • Loesje 16:05 9 Nov 2005 (CET) Note: done by Almindor per request
  • Bartek 16:28, 9 Nov 2005 (CET)
  • Gpremuda 23:42, 9 Nov 2005 (CET)
  • Sekel 03:05, 10 Nov 2005 (CET)
  • Jeff P.
  • Michalis 19:55, 10 Nov 2005 (CET)
  • Giulio 18:48, 7 November 2006 (CET)
  • Kbowes 06:11, 13 December 2008 (CET) Sounds good, but I'm thinking we should use it as a modifier:
      type
        TGenericClass = generic class of x
          ..
        end;
        TGenericRec = generic record of x
           ...
        end;
    
    I agree with above that we really shouldn't be copying C++'s cryptic use of <> for them.
  • Kai Burghardt (talk) 15:40, 8 November 2018 (CET)

Vote for radically different syntax

  • PublicJoke 15:08, 10 Nov 2005 (CET) Note: it's better to extend 'unit' and 'uses' clauses

See also