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## New since D4
44
55### Exporting of overloaded functions
66
77(version not entirely sure, but came in with overloading, so definitely pre-D6)
88
99In library packages select an overloaded variant to export. Assume we have some overloaded methods:
1010
1111function doSomeThing(a:type1):type2;stdcall; function doSomeThing(a:type3):type4;stdcall;
1212
1313and in the library (for building the dll using the unit above) we want to export them:
1414
1515exports
1616
17-`   doSomeThing(a:type1) name 'doSomeThingTYPE1',`\
18-`   doSomeThing(a:type3) name 'doSomeThingTYPE3';`
17+```text
18+ doSomeThing(a:type1) name 'doSomeThingTYPE1',
19+ doSomeThing(a:type3) name 'doSomeThingTYPE3';
20+```
1921
2022### implements delegation of interfaces
2123
2224Delegating interfaces to classes is not always supported,
2325
2426- [Mantis 16531](http://bugs.freepascal.org/view.php?id=16531)
2527- [Mantis 8591](http://bugs.freepascal.org/view.php?id=8951)
2628- [Mantis 23403](http://bugs.freepascal.org/view.php?id=23403)
2729
2830## New since Delphi 2007
2931
3032## New since Delphi 2009
3133
3234#### Anonymous Methods
3335
34361. <http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/anonymousmethods_xml.html>
35372. <http://delphi.about.com/od/objectpascalide/a/understanding-anonymous-methods-in-delphi.htm>
3638
3739Supported since 3.3.1: [[FPC New Features Trunk|Support for Function References and Anonymous Functions]]
3840
3941## New since Delphi 2010
4042
4143#### Custom Attributes
4244
4345Custom 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.
4446
4547<http://delphi.about.com/od/oopindelphi/a/delphi-attributes-understanding-using-attributes-in-delphi.htm>
4648
4749Supported since 3.3.1: [[Custom Attributes]]
4850
4951#### Enhanced RTTI
5052
5153<http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_(Delphi)>
5254
5355#### Delayed directive
5456
5557Info is here: <http://docwiki.embarcadero.com/RADStudio/en/Libraries_and_Packages#Delayed_Loading> Some info about internals:
5658
57591. <http://blogs.embarcadero.com/abauer/2009/08/25/38894>
58602. <http://blogs.embarcadero.com/abauer/2009/08/29/38896>
59613. <http://blogs.embarcadero.com/chrishesik/2009/11/02/35056>
6062
6163fpc wiki about that topic: <http://wiki.freepascal.org/Dynamically_loading_headers>
6264
6365Originally 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 13:45, 18 January 2013 (UTC)
6466
6567## Misc
6668
67691. [[packages|(Library) packages]]
68702. "automated" keyword, which is like "public", but generates COM specific RTTI. Afaik this kind of COM usage is deprecated though.
6971
7072## Already implemented
7173
7274### FPC 3.0.4
7375
7476#### Advanced records
7577
7678<http://docwiki.embarcadero.com/RADStudio/en/Structured_Types#Records_.28advanced.29>
7779
7880### FPC 2.6.0
7981
8082#### AS and IS extended for interfaces
8183
8284New since Delphi 2010. Info is here:
8385
84861. <http://docwiki.embarcadero.com/RADStudio/en/Interface_References#Casting_Interface_References_to_Objects>
85872. <http://blogs.embarcadero.com/abauer/2009/08/21/38893>
8688
8789Implemented in FPC 2.6.0.
8890
8991## Reference
9092
91931. <http://edn.embarcadero.com/article/34324>
92942. <http://edn.embarcadero.com/article/images/39076/New_Delphi_Coding_Styles_and_Architectures.pdf>
93953. <http://docwiki.embarcadero.com/RADStudio/en/What's_New_in_Delphi_and_C%2B%2BBuilder_2010>
9496
9597---
9698*From the Free Pascal wiki, page "Delphi language features missing from the Free Pascal Compiler", as it stood on 2023-08-08 after a change by Mattias2, out of the wiki's dump of 2024-05-26. 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).*
9799Category: Delphi
98100Category: FPC

Back to history