delphi language features which fpc does not have

From Free Pascal wiki
Jump to: navigation, search

Note: some new Delphi features are already implemented in FPC trunk.


New since D4

Exporting of overloaded functions

(version not entirely sure, but came in with overloading, so definitely pre-D6)

In library packages select an overloaded variant to export. Assume we have some overloaded methods:

function doSomeThing(a:type1):type2;stdcall; function doSomeThing(a:type3):type4;stdcall;

and in the library (for building the dll using the unit above) we want to export them:


   doSomeThing(a:type1) name 'doSomeThingTYPE1',
   doSomeThing(a:type3) name 'doSomeThingTYPE3';

implements delegation of interfaces

Delegating interfaces to classes is not always supported,

New since Delphi 2007

Advanced Records

Advanced records are implemented in FPC 2.6.X without record constructors. Record constructors are implemented in FPC 2.7.1 (trunk).

New since Delphi 2009

Generics Syntax

A good delphi reference is here:

Partially implemented in 2.5.1/2.6.x, further improved in 2.7.1 by Sven

Support for ansistrings with a definable codepage

Initial implementation available in trunk (2.7.1). Useful for small time testing, but the whole of the codebase hasn't adapted (2011-10-18)

Anonymous Methods


New since Delphi 2010

Custom Attributes

Custom Attributes are a language feature in Delphi that allow annotating types and type members with special objects that carry additional information. Attributes extend the object-oriented model with aspect-oriented elements.

Enhanced RTTI

Delayed directive

Info is here: Some info about internals:


fpc wiki about that topic:

Originally I thought that delayed is similar to weakexternal which FPC has for some platforms but after reading this: I understand that this is simply a wrapper around LoadLibrary and GetProcessAdress with automatic loading and unloading.--Paul Ishenin 13:45, 18 January 2013 (UTC)


  1. (Library) packages
  2. "automated" keyword, which is like "public", but generates COM specific RTTI. Afaik this kind of COM usage is deprecated though.

Already implemented

FPC 2.7.1/trunk

Advanced records

See above.

FPC 2.6.0

AS and IS extended for interfaces

New since Delphi 2010. Info is here:


Implemented in FPC 2.6.0.


Personal tools