Sign in Join
Wiki copytemporary

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

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

Title: Delphi language features missing from the Free Pascal Compiler

OldNewLine
1+Note: some new Delphi features are already implemented in [[FPC New Features Trunk|FPC trunk]].
2+
3+## New since D4
4+
5+### Exporting of overloaded functions
6+
7+(version not entirely sure, but came in with overloading, so definitely pre-D6)
8+
9+In library packages select an overloaded variant to export. Assume we have some overloaded methods:
10+
11+function doSomeThing(a:type1):type2;stdcall; function doSomeThing(a:type3):type4;stdcall;
12+
13+and in the library (for building the dll using the unit above) we want to export them:
14+
15+exports
16+
17+`   doSomeThing(a:type1) name 'doSomeThingTYPE1',`\
18+`   doSomeThing(a:type3) name 'doSomeThingTYPE3';`
19+
20+### implements delegation of interfaces
21+
22+Delegating interfaces to classes is not always supported,
23+
24+- [Mantis 16531](http://bugs.freepascal.org/view.php?id=16531)
25+- [Mantis 8591](http://bugs.freepascal.org/view.php?id=8951)
26+- [Mantis 23403](http://bugs.freepascal.org/view.php?id=23403)
27+
28+## New since Delphi 2007
29+
30+## New since Delphi 2009
31+
32+#### Anonymous Methods
33+
34+1. <http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/anonymousmethods_xml.html>
35+2. <http://delphi.about.com/od/objectpascalide/a/understanding-anonymous-methods-in-delphi.htm>
36+
37+Supported since 3.3.1: [[FPC New Features Trunk|Support for Function References and Anonymous Functions]]
38+
39+## New since Delphi 2010
40+
41+#### Custom Attributes
42+
43+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.
44+
45+<http://delphi.about.com/od/oopindelphi/a/delphi-attributes-understanding-using-attributes-in-delphi.htm>
46+
47+Supported since 3.3.1: [[Custom Attributes]]
48+
49+#### Enhanced RTTI
50+
51+<http://docwiki.embarcadero.com/RADStudio/en/RTTI_directive_(Delphi)>
52+
53+#### Delayed directive
54+
55+Info is here: <http://docwiki.embarcadero.com/RADStudio/en/Libraries_and_Packages#Delayed_Loading> Some info about internals:
56+
57+1. <http://blogs.embarcadero.com/abauer/2009/08/25/38894>
58+2. <http://blogs.embarcadero.com/abauer/2009/08/29/38896>
59+3. <http://blogs.embarcadero.com/chrishesik/2009/11/02/35056>
60+
61+fpc wiki about that topic: <http://wiki.freepascal.org/Dynamically_loading_headers>
62+
63+Originally 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)
64+
65+## Misc
66+
67+1. [[packages|(Library) packages]]
68+2. "automated" keyword, which is like "public", but generates COM specific RTTI. Afaik this kind of COM usage is deprecated though.
69+
70+## Already implemented
71+
72+### FPC 3.0.4
73+
74+#### Advanced records
75+
76+<http://docwiki.embarcadero.com/RADStudio/en/Structured_Types#Records_.28advanced.29>
77+
78+### FPC 2.6.0
79+
80+#### AS and IS extended for interfaces
81+
82+New since Delphi 2010. Info is here:
83+
84+1. <http://docwiki.embarcadero.com/RADStudio/en/Interface_References#Casting_Interface_References_to_Objects>
85+2. <http://blogs.embarcadero.com/abauer/2009/08/21/38893>
86+
87+Implemented in FPC 2.6.0.
88+
89+## Reference
90+
91+1. <http://edn.embarcadero.com/article/34324>
92+2. <http://edn.embarcadero.com/article/images/39076/New_Delphi_Coding_Styles_and_Architectures.pdf>
93+3. <http://docwiki.embarcadero.com/RADStudio/en/What's_New_in_Delphi_and_C%2B%2BBuilder_2010>
94+
95+---
96+*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).*
97+Category: Delphi
98+Category: FPC

Back to history