Difference between revisions of "Delphi language features missing from the Free Pascal Compiler"

From Free Pascal wiki
Jump to navigationJump to search
Line 25: Line 25:
 
==== Custom Attributes ====
 
==== Custom Attributes ====
 
==== Enhanced RTTI ====
 
==== Enhanced RTTI ====
==== Class constructors and destructors ====
 
http://blogs.embarcadero.com/abauer/2009/09/03/38898
 
 
Implemented in 2.5.1
 
 
 
==== Delayed directive ====
 
==== Delayed directive ====
  
Line 47: Line 42:
  
 
== Misc ==
 
== Misc ==
#<s>using point in the unitname like: unit Borland.VCL.Types (since Delphi 7)</s> (implemented in 2.7.1)
 
 
#Constructor syntax for Dynamic arrays [http://bugs.freepascal.org/view.php?id=15385 Mantis 15385]
 
#Constructor syntax for Dynamic arrays [http://bugs.freepascal.org/view.php?id=15385 Mantis 15385]
 
# [[packages|(Library) packages]]
 
# [[packages|(Library) packages]]

Revision as of 06:36, 11 September 2011

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

New since Delphi 2007

Advanced Records

http://docwiki.embarcadero.com/RADStudio/en/Structured_Types#Records_.28advanced.29

Implemented without record constructors.

New since Delphi 2009

Generics Syntax

A good delphi reference is here: http://docwiki.embarcadero.com/RADStudio/en/Generics_Index

Partially implemented in 2.5.1

Support for ansistrings with a definable codepage

Anonymous Methods

http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/anonymousmethods_xml.html

New since Delphi 2010

Custom Attributes

Enhanced RTTI

Delayed directive

Info is here: http://docwiki.embarcadero.com/RADStudio/en/Libraries_and_Packages#Delayed_Loading Some info about internals:

  1. http://blogs.embarcadero.com/abauer/2009/08/25/38894
  2. http://blogs.embarcadero.com/abauer/2009/08/29/38896
  3. http://blogs.embarcadero.com/chrishesik/2009/11/02/35056

fpc wiki about that topic: http://wiki.freepascal.org/Dynamically_loading_headers

AS and IS extended for interfaces

Info is here:

  1. http://docwiki.embarcadero.com/RADStudio/en/Interface_References#Casting_Interface_References_to_Objects
  2. http://blogs.embarcadero.com/abauer/2009/08/21/38893

Misc

  1. Constructor syntax for Dynamic arrays Mantis 15385
  2. (Library) packages
  3. "automated" keyword, which is like "public", but generates COM specific RTTI. Afaik this kind of COM usage is deprecated though.

Reference

  1. http://edn.embarcadero.com/article/34324
  2. http://edn.embarcadero.com/article/images/39076/New_Delphi_Coding_Styles_and_Architectures.pdf
  3. http://docwiki.embarcadero.com/RADStudio/en/What's_New_in_Delphi_and_C%2B%2BBuilder_2010