Delphi 语言特性和引入/弃用的版本列表 [英] List of Delphi language features and version in which they were introduced/deprecated

查看:31
本文介绍了Delphi 语言特性和引入/弃用的版本列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开始之前,我想指出,我已经诚实而真诚地通过 Google 反复、详尽地搜索了这样的东西,但一直找不到.

我需要(对于我正在开发的项目)所有 Delphi(2007 到最新发布的版本,我不再支持任何早于 2007 的版本)语言功能"的列表,以及它们所在的版本引入并(如适用)弃用、改进或移除.

我之前在 Stack Overflow 上也注意到过与此类似的问题,尽管其中大部分都以哪个功能最好"的形式表达,并认为不合适就关闭了.

如果有人知道这样的列表(或有足够的空闲时间来编译),我将不胜感激.

接受的答案将包含指向此类列表的链接或列表本身.

解决方案

请注意,此答案仅列出了新的语言功能
不是新的 VCL/FMX 功能.

这里是 RAD Studio docwiki 的链接:

来自 Embarcadero 的完整列表:最新消息
另请参阅:David I 的名单


总结:

Delphi 10.4

  • 在所有平台上统一内存管理 - 完整的 ARC 编译器已被删除,所有编译器现在都对对象使用手动(经典)内存管理
  • 自定义管理记录
  • 支持 macOS 64 位
  • 支持 Android 64 位

Delphi 10.3

  • 64 位 Linux 编译器没有不再使用 ARC,而是使用默认的手动管理,这与 Windows 编译器中的相同.这使得将代码从 Windows 或 OSX 移植到 Linux 变得更加容易.
  • 内联变量自动类型推断
  • 在 Linux 上启用 8 位 AnsiChar/AnsiString 支持.
  • C++Builder 和 Delphi 现在对所有调用使用相同的 ABI.

Delphi 10.2 东京

德尔福 10.1 柏林

德尔福 10 西雅图

  • 支持 Android 5.1.1 和 iOS 8.4
  • 改进了 OSX 异常处理

Delphi XE8

  • 支持 64 位 iOS;
  • 新的整数类型:FixedIntFixedUInt 所有平台上的 32 位整数类型;
  • 新的平台相关整数类型:LongIntLongWord(iOS-64 上为 64 位,所有其他平台上为 32 位);

Delphi XE7

Delphi XE6

Delphi XE5

Delphi XE4

在 XE4 中,情况发生了变化,因此 $ENDIF 成为了 $IF、$IFDEF、$IFNDEF 和 $IFOPT 的公认终结符.

Delphi XE3

Delphi XE2

Delphi XE

  • {$STRINGCHECKS} 编译器指令在 XE 中被忽略;
  • {$ALIGN} 指令的新 16 字节值:{$ALIGN} 指令的可接受值现在包括 1、2、4、8 和 16.
  • new {$CODEALIGN} 指令,它设置过程或函数的起始地址.
  • {$STRONGLINKTYPES ON} 指令
  • 支持正则表达式.

Delphi 2010

Delphi 2009

Delphi 2007

  • 据我所知没有语言变化;
    请注意,Delphi 2007 是一个不间断版本,D2006 中的 DCU 将在 D2007 中保持不变
  • (2007 年的 .NET个性"引入泛型)

Delphi 2006

德尔福 2005

  • for ... in 循环,
  • inline 关键字
  • 允许使用声明中的通配符
  • 嵌套类型
  • 嵌套常量
  • {$REGION}/{$ENDREGION} 指令

Delphi 7

  • 三个额外的编译器警告:
  • Unsafe_Type,
  • Unsafe_Code 和
  • Unsafe_Cast.这些警告默认是禁用的,但可以启用
  • 新编译器指令{$WARN UNSAFE_CODE ON}
  • 使用 TFormatSettings 结构格式化和解析数字、日期时间值和货币的例程的重载.

Delphi 6

Delphi 5

没有新的语言功能,但是:

德尔福 4

  • 动态数组
  • LongWordInt64Cardinal 是一个 UINT32 (在它是无符号的 31 位值之前)
  • Real 占用 8 个字节,与 double 相同(以前是 6 个字节);
    • 使用新的 {$REALCOMPATIBILITY ON} 编译器指令覆盖;
    • REAL48 替换旧的 6 字节 real;
  • 支持资源字符串
  • 方法重载
  • 默认参数
  • {$EXTERNALSYM}{$NODEFINE} 指令
  • implements 属性的关键字莉>

Delphi 3

  • Wordbool、longbool 和 bytebool 将 true 存储为 -1 而不是 1(布尔值不变)
  • 必须使用 packages 安装组件.
  • 断言.
  • out 参数.
  • 宽字符串
  • interfacedispinterface 关键字和 COM (dispid) 支持.

Delphi 2

  • 支持 32 位;
  • Ansistring 替换 shortstring 作为默认字符串类型
  • 货币
  • Variant(用于与 OLE 互操作自动化).
  • 线程支持和ThreadVar关键字.
  • 4 字节数据是 4 字节对齐的新 packed 关键字覆盖此行为;
  • TDateTime 开始于 1899/12/30 在 D1 下它开始于 0000/00/00
  • new finalization 关键字
  • 添加了
  • registerstdcall 调用约定.
  • packed 关键字.

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.

解决方案

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


To summarize:

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

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

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.

这篇关于Delphi 语言特性和引入/弃用的版本列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆