Sign in Join
Wiki copytemporary

Delphi language features missing from the Free Pascal Compiler: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11Note: some new Delphi features are already implemented in [[FPC New Features Trunk|FPC trunk]].
22
33## Contents
44
55 * 1 New since D4
66 * 1.1 Exporting of overloaded functions
77 * 1.2 implements delegation of interfaces
88 * 2 New since Delphi 2007
99 * 3 New since Delphi 2009
1010 * 3.1 Anonymous Methods
1111 * 4 New since Delphi 2010
1212 * 4.1 Custom Attributes
1313 * 4.2 Enhanced RTTI
1414 * 4.3 Delayed directive
1515 * 5 Misc
1616 * 6 Already implemented
1717 * 6.1 FPC 3.0.4/trunk
1818 * 6.1.1 Advanced records
1919 * 6.2 FPC 2.6.0
2020 * 6.2.1 AS and IS extended for interfaces
2121 * 7 Reference
2222
2323## New since D4
2424
2525### Exporting of overloaded functions
2626
2727(version not entirely sure, but came in with overloading, so definitely pre-D6)
2828
2929In library packages select an overloaded variant to export. Assume we have some overloaded methods:
3030
3131function doSomeThing(a:type1):type2;stdcall; function doSomeThing(a:type3):type4;stdcall;
3232
3333and in the library (for building the dll using the unit above) we want to export them:
3434
3535exports
3636```
3737doSomeThing(a:type1) name 'doSomeThingTYPE1',
3838 doSomeThing(a:type3) name 'doSomeThingTYPE3';
3939```
4040
4141### implements delegation of interfaces
4242
4343Delegating interfaces to classes is not always supported,
4444
4545 * [Mantis 16531](<http://bugs.freepascal.org/view.php?id=16531>)
4646 * [Mantis 8591](<http://bugs.freepascal.org/view.php?id=8951>)
4747 * [Mantis 23403](<http://bugs.freepascal.org/view.php?id=23403>)
4848
4949## New since Delphi 2007
5050
5151## New since Delphi 2009
5252
5353#### Anonymous Methods
5454
5555 1. <http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/anonymousmethods_xml.html>
5656 2. <http://delphi.about.com/od/objectpascalide/a/understanding-anonymous-methods-in-delphi.htm>
5757
5858## New since Delphi 2010
5959
6060#### Custom Attributes
6161
6262Custom 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.
6363
6464<http://delphi.about.com/od/oopindelphi/a/delphi-attributes-understanding-using-attributes-in-delphi.htm>
6565
6666#### Enhanced RTTI
6767
6868<http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_(Delphi)>
6969
7070#### Delayed directive
7171
7272Info is here: <http://docwiki.embarcadero.com/RADStudio/en/Libraries_and_Packages#Delayed_Loading> Some info about internals:
7373
7474 1. <http://blogs.embarcadero.com/abauer/2009/08/25/38894>
7575 2. <http://blogs.embarcadero.com/abauer/2009/08/29/38896>
7676 3. <http://blogs.embarcadero.com/chrishesik/2009/11/02/35056>
7777
7878fpc wiki about that topic: <http://wiki.freepascal.org/Dynamically_loading_headers>
7979
8080Originally I thought that delayed is similar to weakexternal which FPC has for some platforms but after reading this: <http://docwiki.embarcadero.com/CodeExamples/XE3/en/DelayedLoading_(Delphi)> I understand that this is simply a wrapper around LoadLibrary and GetProcessAdress with automatic loading and unloading.--[Paul Ishenin](</User:Paul_Ishenin> "User:Paul Ishenin") 13:45, 18 January 2013 (UTC)
8181
8282## Misc
8383
8484 1. [[packages|(Library) packages]]
8585 2. "automated" keyword, which is like "public", but generates COM specific RTTI. Afaik this kind of COM usage is deprecated though.
8686
8787## Already implemented
8888
8989### FPC 3.0.4/trunk
9090
9191#### Advanced records
9292
9393<http://docwiki.embarcadero.com/RADStudio/en/Structured_Types#Records_.28advanced.29>
9494
9595### FPC 2.6.0
9696
9797#### AS and IS extended for interfaces
9898
9999New since Delphi 2010. Info is here:
100100
101101 1. <http://docwiki.embarcadero.com/RADStudio/en/Interface_References#Casting_Interface_References_to_Objects>
102102 2. <http://blogs.embarcadero.com/abauer/2009/08/21/38893>
103103
104104Implemented in FPC 2.6.0.
105105
106106## Reference
107107
108108 1. <http://edn.embarcadero.com/article/34324>
109109 2. <http://edn.embarcadero.com/article/images/39076/New_Delphi_Coding_Styles_and_Architectures.pdf>
110110 3. <http://docwiki.embarcadero.com/RADStudio/en/What's_New_in_Delphi_and_C%2B%2BBuilder_2010>
111111
112112---
113-*From the Free Pascal wiki, page "delphi language features which fpc does not have", as the Internet Archive kept it on 2022-10-01. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
113+*From the Free Pascal wiki, page "delphi language features which fpc does not have", as the Internet Archive kept it on 2022-10-01, last changed on 2021-06-12. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history