List of Delphi language features and version in which they were introduced/deprecated
Asked Answered
B

3

123

Before I begin, I would like to point out that I have honestly and genuinely searched repeatedly and exhaustively via Google for such a thing, and been unable to find one.

I require (for a project I'm developing) a list of all Delphi (2007 to the very latest released version, I no longer support any version older than 2007) "Language Features", and the versions in which they were introduced and (where applicable) deprecated, improved or removed.

I have noted similar questions to this on Stack Overflow before, though most of those were phrased in the form of "which feature is best", and closed as deemed unsuitable.

If anyone knows of such a list (or has enough spare time to compile one), I would be very grateful.

The accepted answer will either contain a link to such a list, or the list itself.

Boswell answered 10/12, 2011 at 21:31 Comment(3)
Q: So why exactly do you need such a list? Q: Are you trying to create one code set (perhaps a component or library) that supports all platforms between BDS2007 and XE2 (i.e. uses no features newer than BDS2007)? Q: If so, why not just try compiling on 2007 and see what breaks? (PS: I'm still happily using BDS2006 ;)).Grisby
Simon check this question Assorted list of what's new in Delphi Language, RTL, VCL? , Also on my blog I mantain a updated List of changes between versions of DelphiHime
@Grisby 1) So I can account for feature limitations across versions in public libraries, 2) Yes (but not a Component Library necessarily), 3) Because it's easier to know in advance than constantly test on different versions every individual aspect of a library. Theoretically D2006 would work fine, but I'm not going to support it actively (no offense).Boswell
M
174

Note that this answer only lists new language features
not new VCL/FMX features.

Here are the links to the RAD Studio docwiki:

The full list from Embarcadero: What's New
See also: David I's list
See also: Delphi Master Release List wiki


To summarize:

Delphi 12

Delphi 11

  • Binary Literals and Digit Separators
  • Inline assembler support for AVX instructions (AVX-512)
  • New record helpers: TDateTimeHelper and TCurrencyHelper
  • macOS ARM 64-bit target platform

Delphi 10.4

  • Unified memory management on all platforms - full ARC compiler has been removed and all compilers now use manual (classic) memory management for objects
  • Custom managed records
  • Support for macOS 64-bit
  • Support for Android 64-bit

Delphi 10.3

  • The 64-bit Linux compiler no longer uses ARC, it instead uses the default manual managed, which is the same as in the Windows compiler. This makes porting code from Windows or OSX to Linux much easier.
  • Inline variables with automatic type inference
  • 8 bit AnsiChar/AnsiString support in enabled on Linux.
  • C++Builder and Delphi now use the same ABI for all calls.

Delphi 10.2 Tokyo

Delphi 10.1 Berlin

Delphi 10 Seattle

  • Support for Android 5.1.1 and iOS 8.4
  • Improved OSX exception handling

Delphi XE8

  • Support for 64-bit iOS;
  • New integer types: FixedInt, FixedUInt 32-bit integer types on all platforms;
  • New platform dependent integer types: LongInt, LongWord (64-bits on iOS-64, 32-bits on all other platforms);

Delphi XE7

Delphi XE6

Delphi XE5 (wayback)

Delphi XE4

At XE4, this changed so that $ENDIF became an accepted terminator for $IF, $IFDEF, $IFNDEF, and $IFOPT.

Delphi XE3

Delphi XE2

Delphi XE

  • The {$STRINGCHECKS} compiler directive is ignored in XE;
  • New 16-byte value for the {$ALIGN} directive: The acceptable values for the {$ALIGN} directive now include 1, 2, 4, 8, and 16.
  • new {$CODEALIGN} directive, this sets the starting address for a procedure or function.
  • The {$STRONGLINKTYPES ON} directive
  • Support for regular expressions.

Delphi 2010

  • Enhanced Delphi RTTI (Run Time Type Information).
  • Attributes
  • The as operator can be used to cast an interface reference back to the object from which it was extracted.
  • The is operator can be used to verify whether an interface reference was extracted from a certain class.
  • Normal unsafe casting can be performed on an interface: TObject(SomeInterface).
  • new delayed directive indicates that an external library such as a DLL is not to be loaded at declaration time but is to wait until the first call to the method
  • Class Constructor/Destructor

Delphi 2009

Delphi 2007

  • No language changes that I know of;
    Note that Delphi 2007 is a non-breaking release, DCU's from D2006 will work unchanged in D2007;
  • (The .NET 'personality' of 2007 introduced generics)

Delphi 2006

Delphi 2005

  • for ... in loops,
  • inline keyword
  • Wildcard in uses statement allowed
  • nested types
  • nested constants
  • {$REGION}/{$ENDREGION} directives
  • class helpers (added in Delphi 8 for .net);

Delphi 7

  • three additional compiler warnings:
  • Unsafe_Type,
  • Unsafe_Code, and
  • Unsafe_Cast. These warnings are disabled by default, but can be enabled
  • new compiler directive {$WARN UNSAFE_CODE ON}
  • Overloads of routines that format and parse numbers, date-time values, and currency using a TFormatSettings structure.

Delphi 6

Delphi 5

No new language features, but:

Delphi 4

  • Dynamic arrays
  • LongWord and Int64; Cardinal is an UINT32 (before it was unsigned 31-bit value)
  • Real takes 8 bytes and is the same as double (previously it was 6 bytes);
    • Override with the new {$REALCOMPATIBILITY ON} compiler directive;
    • REAL48 replaces the old 6-byte real;
  • Support for resourcestrings
  • Method overloading
  • Default parameters
  • {$EXTERNALSYM} and {$NODEFINE} directives
  • implements keyword for properties

Delphi 3

  • Wordbool, longbool and bytebool store true as -1 instead of 1 (Boolean is unchanged)
  • Components must be installed using packages.
  • Assertions.
  • out parameters.
  • Widestring
  • interface and dispinterface keyword and COM (dispid) support.

Delphi 2

  • Support for 32-bit;
  • Ansistring replaces shortstring as the default string type
  • Currency
  • Variant (for interop with OLE automation).
  • Threading support and ThreadVar keyword.
  • 4 byte data is 4 byte aligned new packed keyword overrides this behavior;
  • TDateTime starts at 1899/12/30 under D1 it started at 0000/00/00
  • new finalization keyword
  • register and stdcall calling conventions added.
  • packed keyword.
Mushy answered 10/12, 2011 at 21:31 Comment(23)
Ah wonderful! I couldn't find a way to get the Docwiki to show me pages specific to older versions of Delphi (pre XE2)... no idea why! This is wonderful, and has been marked as the correct answer! Thanks!Boswell
@DavidHeffernan It is useful to have the features new in 2007 since this sets the baseline... in a sense, I will know with certainty whether a portion of what I'm producing could perhaps work in earlier versions (even if I myself have no intention to support it)Boswell
Why stop at 2007 in that case.Seismism
On my blog I mantain a updated List of changes between versions of DelphiHime
Well, it comes down to what I'm willing to support. It's useful to know if a portion of a library would work on earlier versions, even if I myself am not supporting that version... simply because I may have the need (on another project) to do something similar for said earlier version, and I'd know what does and does not work.Boswell
No, I mean why stop listing the new features at 2007? If you want to know what could perhaps work in earlier versions, then you'd need to go back further.Seismism
@AndreasRejbrand, this SO question may refresh your memory : delphi-xe-multi-unit-namespace-question.Endorsement
@AndreasRejbrand, I understand it to mean you can have 2 functions with the same name in 2 units and reference them using unit1.func and unit2.funcMushy
Holy Crap DELAYED, that is AWESOME! Why don't they give you this list when you upgrade!Stace
This is not accurate. $LIBPREFIX et al directives are there at least since D7 (I suspect D6, since they are Kylix related)Hinda
'Fully Qualified Names Are Now Required When Including Run-time Packages' in XE8 seems to apply only to C++ according to the linked Dowcwiki pageCaliper
When was CharInSet / TSysCharSet first introduced? Assumedly D2009?Groundsheet
D2007 introduced generics in Delphi.NETGlottology
@Mushy I misinterpreted what the Docwiki says (it's excessively vague, really).Boswell
@LaKraven, The features you've added are not language features I know I'm on the slippery slope myself because I've added Support for Ios/android version x.y in lots of places, but you may be pushing it here. What do you think?Mushy
@EMBarbosa, the REST library is not a language feature. If I allowed non-language features this answer would be many pages long.Mushy
@Mushy Thanks for clarifying it. I was looking for that before, so I thought that it could help anyone too. Anyway, could you add "and not VCL|FMX improvements." in the first paragraph?Loux
But where is the REST Library?Winne
A REST lib is hardly a language feature, now is it?Mushy
Delphi 3: "Wordbool, longbool and bytebool store false as -1 instead of 1 (Boolean is unchanged)" - Shouldn't that be "store TRUE as -1" ?Endorsee
@Johan, the support for custom managed records in 10.3 was deferred to next version (as is nullable types). Linux is now non-ARC. And types can be inferred for inlined variables.Endorsement
Indeed, blog.marcocantu.com/blog/….Horologium
@LURD, sorry forgot to press the Save button.Mushy
H
16

Just for complement the answer of Johan check this entry on my blog List of changes between versions of Delphi (Since Delphi 5) and the excellent page The TIndex which list most of the new features since delphi 2005 and resources about each one.

Hime answered 10/12, 2011 at 22:15 Comment(2)
Sometime ago another delphi site delphi3000 was marked as dangerous for somes antivirus.Hime
I'm the owner of The TIndex and I can confirm that it is a false positive.Countryandwestern
I
7

The jedi.inc file used by the Dephi JEDI project exposes a series of feature defines. If your project is MPL-compatible, you could even use it for feature detection and save yourself the trouble of reinventing that particular wheel.

For example, it defines SUPPORTS_FOR_IN if the compiler supports enumerators. One could wrap your enumerator code in an IFDEF checking for that define rather than checking for a particular compiler version.

Illuminating answered 12/12, 2011 at 15:6 Comment(3)
Yes, this include is certainly helpful, but it lacks the completeness of a detailed list (hence this question). Thanks for the suggestion... consider the accepted answer to this question to be an enhancement on the information provided by jedi.inc :)Boswell
@LaKraven: True, there's a lot of things it doesn't get, but for some it may be enough. It also has the advantage of being already done. :-) Personally, I think that flattening the VCL hierarchies, stripping the copyright headers, and tossing them all into a version control repository might be handy too. That way you can see when particular RTL/VCL features were implemented.Illuminating
@LaKraven, I believe what jedi.inc at least accurate, while Johan's list needs some verifications.Hinda

© 2022 - 2024 — McMap. All rights reserved.