delphi - 引入/不推荐使用的Delphi语言功能和版本列表

标签 delphi delphi-2007

在开始之前,我想指出的是,我已经通过Google进行了一次诚实而真实的搜索,涉及范围很广,无法找到。

我需要(对于我正在开发的项目)所有Delphi(从2007年到最新发布的版本,我不再支持任何早于2007年的版本)“语言功能”的列表,以及引入这些功能的版本和( (如果适用)不推荐使用,改进或删除。

我之前在Stack Overflow上已经注意到了与此类似的问题,尽管大多数问题都是以“哪个功能最好”的形式表述的,并被认为不合适。

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

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

最佳答案

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

以下是RAD Studio docwiki的链接:

  • What's new in Rad Studio 10.3 Rio
  • What's new in Delphi and C++Builder 10.2 Tokyo
  • What's new in Delphi and C++Builder 10.1 Berlin
  • What's new in Delphi and C++Builder 10 Seattle
  • What's new in Delphi and C++Builder XE8
  • What's New in Delphi and C++Builder XE7
  • What's New in Delphi and C++Builder XE6
  • What's New in Delphi and C++Builder XE5
  • What's New in Delphi and C++Builder XE4
  • What's New in Delphi and C++Builder XE3
  • What's New in Delphi and C++Builder XE2
  • What's New in Delphi and C++Builder XE
  • What's New in Delphi and C++Builder 2010
  • What's New in Delphi and C++Builder 2009
  • What's New in RAD Studio (Delphi for Win32 2007)
  • What's New in RAD Studio (C++Builder 2007)
  • What’s New in Delphi 2006
  • What’s New in Delphi 2005
  • What’s New in Delphi 7
  • What’s New in Delphi 6
  • What’s New in Delphi 5
  • What's New in Delphi 4
  • What's New in Delphi 3
  • What's New in Delphi 2
  • Delphi 1 Features

  • 来自Embarcadero的完整列表:What's New
    另请参阅:David I's list

    总结一下:

    Delphi 10.3.x,10.4 (尚未发布,这是推测性的)
  • Custom managed records
  • 可空类型
  • 支持macOS 64位
  • 对Android 64位
  • 的支持

    Delphi 10.3
  • The 64-bit Linux compiler no longer uses ARC,它使用默认的手动管理,与Windows编译器中的相同。这使得将代码从Windows或OSX移植到Linux变得更加容易。
  • 带有自动类型推断的
  • Inline variables
  • 在Linux上启用时支持8位AnsiChar / AnsiString。
  • C++ Builder和Delphi现在对所有调用使用相同的ABI。

  • Delphi 10.2 Tokyo
  • 支持Linux服务器应用程序(使用LLVM和ARC的Intel 64位)。
  • Assigning a dynamic arrays to a pointer using the @ operator is only allowed when hard-casting the array.
  • More flexible namespace resolution of unit names

  • Delphi 10.1 Berlin
  • 在所有平台上对Utf8StringRawByteString类型的本地支持
  • 所有编译器均支持 [weak] , [unsafe] and [volatile] attributes
  • The size of extended on OSX is now 16 bytes.
  • class and record helpers cannot access private members of the classes or records they extend
  • 支持Android最高6.01。

  • Delphi 10 Seattle
  • 对Android 5.1.1和iOS 8.4的支持
  • 改进了OSX异常处理

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

  • Delphi XE7
  • String-Like Operations Supported on Dynamic Arrays
  • Parallel Library added to the RTL
  • New compiler intrinsic routines (undocumented):
    function IsManagedType(T: TypeIdentifier): Boolean; function HasWeakRef(T: TypeIdentifier): Boolean; function GetTypeKind(T: TypeIdentifier): TTypeKind; function IsConstValue(Value): boolean;

  • Delphi XE6

    Delphi XE5
  • Android支持;
    需要配备ArmV6 + Neon或ArmV7的设备进行部署
    介绍conditional define ANDROID
  • Operator overloading for classes (but only for the NextGen compiler {Android/iOS})

  • Delphi XE4
  • XE4中引入/启用了以下新条件:
    自动退款
    中央处理器
    EXTERNAL_LINKER
    iOS
    下一代
    UNDERSCOREIMPORTNAME
    弱引用
    WEAKINSTREF
    弱引用
  • 重新引入了对iOS的支持。
  • 用于指定外部库依赖项的新 dependency directive(在XE8之前未记录)。
  • NextGen编译器中的
  • ARC support(包括TObject.DisposeOf)。
    Note that much of the groundwork for ARC was already in XE3, but much of it was disabled
  • Before the XE4 release, $IF statements could only be terminated with $IFEND $IFDEF$IFNDEF$IFOPT指令只能以$ENDIF终止。

  • 在XE4上,情况发生了变化,因此$ ENDIF成为$ IF,$ IFDEF,$ IFNDEF和$ IFOPT的可接受终止符。

    Delphi XE3
  • Record helpers for built-in types
  • 删除了对iOS的支持。
  • 原子内在函数:
    AtomicExchange() AtomicIncrement() AtomicCmpExchange() AtomicDecrement()
  • [ref] attribute的简介。

  • Delphi XE2
  • 对Mac OSX(32位)和iOS的跨平台支持;
  • 对Win64的支持;
  • 修改了RTL以支持跨平台;
  • Packed Now Forces Byte Alignment of Records(在XE2之前的版本中不一定要这样做)
  • 添加了八个新的DEFINE:

    ALIGN_STACK
    CPUX86
    CPUX64
    MACOS(Mac操作系统)
    MACOS32
    PC_MAPPED_EXCEPTIONS
    PIC
    WIN64
  • Full unit scope names are now required in your uses clause.
  • {$ExcessPrecision on/off} compiler directive(仅x64)
  • 内置类型因目标平台(32/64位)而异
  • 扩展数据类型在Win32上为10字节,在Win64上为8(!)字节

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

  • Delphi 2010
  • 增强的Delphi RTTI(运行时类型信息)。
  • Attributes
  • as运算符可用于将接口(interface)引用投射回提取它的对象。
  • is运算符可用于验证是否从某个类中提取了接口(interface)引用。
  • 可以在以下接口(interface)上执行正常的不安全铸造:TObject(SomeInterface)
  • 新的delayed指令指示在声明时不要加载诸如DLL之类的外部库,而要等到第一次调用
  • 方法时
  • Class Constructor/Destructor

  • Delphi 2009
  • 固有类型string现在映射到UnicodeString
  • {$HighCharUnicode on|off} compiler directive
  • Generics;
  • function Default(T): T intrinsic function (Undocumented)
  • Smart pointers;
  • Anonymous methods;
  • Support for nested exceptions and exception tracing;
  • 支持pointermath和新的编译器指令:{$PointerMath on|off};
  • 四个新的编译器警告:
  • W1057 Implicit string cast from '%s' to '%s'
  • W1058 Implicit string cast with potential data loss from '%s' to '%s'
  • W1059 Explicit string cast from '%s' to '%s'
  • W1060 Explicit string cast with potential data loss from '%s' to '%s';
  • Exit函数可以使用指定结果的参数。
  • resourcestrings为宽字符串;
  • TObject除了其VMT指针外还有extra hidden pointer to TMonitor
  • deprecated关键字现在可以具有其他文本

  • Delphi 2007
  • 我所不知道的语言变化;
    请注意,Delphi 2007是一个不间断的发行版,D2006中的DCU将在D2007中保持不变。
  • (2007 introduced generics的.NET'个性')

  • Delphi 2006
  • Enhanced records;
  • operator overloading;
  • static方法和属性;
  • class helpers;
  • FastMM是默认的内存管理器;
  • strict private/protected visibility keyword;
  • final关键字用于虚拟方法;
  • {$METHODINFO}指令;

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

  • Delphi 7
  • 另外三个编译器警告:
  • Unsafe_Type,
  • Unsafe_Code和
  • Unsafe_Cast。这些警告默认情况下处于禁用状态,但可以启用
  • new compiler directive {$WARN UNSAFE_CODE ON}
  • 重载使用TFormatSettings结构格式化和解析数字,日期时间值和货币的例程。

  • Delphi 6
  • [TCustomVariantType][68]提供operator overloading for custom variant types
  • 新的编译器指令:
  • {$IFDEF MSWINDOWS}
  • {$IFDEF LINUX}
  • {$LIBPREFIX}
  • {$LIBSUFFIX}
  • {$LIBVERSION}
  • {$MESSAGE 'message'}
  • {$SetPEFlags}
  • 支持{$IF}{$ELSE}编译器指令
  • Compiler hinting directives: experimental , deprecated , library , platform (但不包含其他不推荐使用的文本)
  • 变体不再基于COM,而是更改为与CLX兼容,基于COM的变体重命名为OLEVariant
  • Typed constants cannot be assigned to (Override with {$J+} )
  • 可以为枚举类型分配一个显式值(cf C++);
  • 接口(interface)属性
  • 支持调用varargs外部函数(但仅适用于cdecl调用约定)
  • 自定义变体

  • Delphi 5

    没有新的语言功能,但是:
  • Support added for Frames

  • Delphi 4
  • Dynamic arrays
  • LongWordInt64; Cardinal是一个UINT32(在未签名31位值之前)
  • Real占用8个字节,与double相同(以前是6个字节);
  • 用新的{$REALCOMPATIBILITY ON}编译器指令覆盖;
  • REAL48替换了原来的6字节real
  • 支持resourcestrings
  • Method overloading
  • Default parameters
  • {$EXTERNALSYM}{$NODEFINE}指令
  • implements keyword用于属性

  • Delphi 3
  • Wordbool,longbool和bytebool将true存储为-1而不是1( bool(boolean) 值不变)
  • 必须使用packages安装组件。
  • 断言。
  • out参数。
  • Widestring
  • interfacedispinterface关键字以及COM(dispid)支持。

  • Delphi 2
  • 支持32位;
  • Ansistringshortstring替换为默认字符串类型
  • Currency
  • Variant (用于与OLE自动化互操作)。
  • 线程支持和 ThreadVar 关键字。
  • 4字节数据是4字节对齐的新packed关键字将覆盖此行为;
  • TDateTime在D1下的1899/12/30处开始,在0000/00/00处开始
  • 新的finalization关键字
  • 添加了
  • registerstdcall调用约定。
  • packed关键字。
  • 关于delphi - 引入/不推荐使用的Delphi语言功能和版本列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8460037/

    相关文章:

    delphi - `at ReturnAddress`在Delphi中是什么意思?

    delphi - MouseDown 时光标没有变化

    delphi - 将 Delphi 2007 升级到 XE6 - 类型库编辑器在哪里?

    delphi - 我的“编译”对话框已消失。有可以控制的设置吗?

    mysql - FireDac MySql Connector.ExecSql 无法工作

    http - 如何更快地分析 HTTP Post 响应

    delphi - 使用 Delphi Firemonekey 在 TImage 的 Canvas 上绘制一个圆圈

    delphi - 如何用空字符串覆盖 Delphi 2007 dproj 文件中的设置?

    .net - 我可以在 "Delphi 2007 for Win32"中使用 .NET DLL 吗?

    Delphi 从 RAD Studio 升级到 Delphi XE