德尔福语言特性列表及其引入/不推荐的版本 [英] List of Delphi language features and version in which they were introduced/deprecated
问题描述
在我开始之前,我想指出,我已经通过Google诚恳地,真诚地搜索了这样一个事情,并找不到一个。
我需要(对于我正在开发的项目)所有Delphi的列表(2007年到最新发布的版本,我不再支持2007年以前的任何版本)语言特性,以及它们被引入的版本(如适用)已被弃用,改进或删除。
之前我已经注意到有关Stack Overflow的类似问题,尽管其中大部分都是以哪个功能是最好的,并被视为不合适。
如果有人知道这样的列表(或有足够的空闲时间编译一个),我将非常感谢。
接受的答案将包含一个链接到这样的列表或列表本身。
请注意,此答案仅列出新的语言 ture
以下是RAD Studio docwiki的链接:
- Delphi和C ++ Builder 10.1中的新功能柏林
- Delphi和C ++ Builder 10西雅图的新功能
- Delphi和C ++ Builder XE8中的新功能
- Delphi和C ++ Builder XE7中的新功能
- 新功能Delphi和C ++ Builder XE6
- Delphi和C ++ Builder XE5中的新功能
- Delphi和C ++ Builder XE4的新功能
- Delphi和C ++ Builder XE3中的新功能
- Delphi和C + + Builder XE2
- 新功能在Delphi和C ++ Builder XE中
- Delphi和C ++ Builder 2010中的新功能
- Delphi和C ++ Builder 2009中的新功能
- RAD Studio的新功能(Delphi for Win32 2007)
- RAD Studio(C ++ Builder 2007)中的新功能
- Delphi 2006中的新功能
- Delphi 2005中的新功能
- De的新功能lphi 7
- Delphi 6的新功能
- Delphi 5的新功能
- Delphi 4的新功能
- Delphi 3的新功能
- Delphi 2的新功能
- Delphi 1功能
完整列表来自Embarcadero:新功能
另请参见:
To(to-delphi-xe5)rel =nofollow noreferrer总结:
- 支持OSX 64位
- 可空类型
- 支持Linux服务器应用程序(使用LLVM的Intel 64位)。
- 本机支持 Utf8String 和 RawByteString 所有平台上的类型
-
[weak]
,[unsafe]
并且所有编译器都支持[volatile]
属性。 - 在OSX上扩展的大小是现在是16字节。
- 类和记录助手无法访问他们扩展的类或记录的私人成员。
- 支持Android,最高6.01。
- 支持Android 5.1.1和iOS 8.4
- 改进的OSX异常处理
- 支持64位iOS;
- 新的整数类型: FixedInt , FixedUInt 所有平台上的32位整数类型;
- 新的依赖平台的整数类型: LongInt , LongWord (iOS-64上的64位,所有其他平台上的32位);
- 完全限定名称现在必须包含单位范围名称
- 动态数组支持的类String操作
- 并行库添加到RTL
-
函数IsManagedType(T:TypeIdentifier):Boolean;
函数HasWeakRef(T:TypeIdentifier):Boolean;
函数GetTypeKind(T:TypeIdentifier):TTypeKind;
函数IsConstValue(Value):boolean;
a href =http://docwiki.embarcadero.com/RADStudio/XE6/en/What's_New_in_Delphi_and_C++Builder_XE6 =nofollow noreferrer> Delphi XE6
- Android支持;
需要使用ArmV6 + Neon或ArmV7进行部署的设备< br>
引入条件定义ANDROID - 类的运算符重载(但仅适用于NextGen编译器{Android / iOS})
-
以下在XE4中引入/启用新的条件:
AUTOREFCOUNT
CPUARM
EXTERNAL_LINKER
IOS
NEXTGEN < br>
UNDERSCOREIMPORTNAME
WEAKREF
WEAKINSTREF
WEAKINTREF
- 重新引入对iOS的支持。
- 在NextGen编译器中( ARC支持) TObject.DisposeOf )。
请注意,ARC的许多基础已经在XE3中,但大部分已被禁用。 - 在XE4发布之前,
$ IF
语句只能以$ IFEND
以及$ IFDEF
,$ IFNDEF
,$ IFOPT
指令只能以$ ENDIF
终止。
在XE4,此更改d使$ ENDIF成为$ IF,$ IFDEF,$ IFNDEF和$ IFOPT的接受终止符。
- 内置类型的记录助手
- 删除对iOS的支持。
- 原子内在函数:
AtomicExchange()
,AtomicIncrement()
,AtomicCmpExchange()
,AtomicDecrement()
- 介绍 [ref] attribute 。
- Mac OSX(32位)和iOS的跨平台支持;
- 支持Win64 ;
- 修改RTL以支持跨平台;
-
打包
现在强制字节对齐记录(Pre XE2它不一定做这个) -
已添加了八个新的DEFINE:
ALIGN_STACK
CPUX86
CPUX64
MACOS(Mac操作系统)
MACOS32
PC_MAPPE D_EXCEPTIONS
PIC
WIN64 - 您的
使用
子句中现在需要完整的单位范围名称。 - 内置类型根据目标平台(32/64位)而有所不同
- 扩展数据类型在Win32上为10个字节,但8 !)在Win64上的字节
- 在XE中忽略
{$ STRINGCHECKS}
编译器指令; -
{$ ALIGN}
指令的新16字节值:
{$ ALIGN}
指令现在包括1,2,4,8和16. - 新
{$ CODEALIGN} / code>指令,这将设置一个过程或函数的起始地址。
-
{$ STRONGLINKTYPES ON}
指示 - 支持正则表达式。
- 增强的Delphi RTTI(运行时类型信息) 。
- 属性
- 可以使用
作为
运算符将接口引用转换回到对象它被提取。 - 可以使用
运算符来验证是否从某个类中提取了一个接口引用。
- 可以在界面上执行正常的不安全投射:
TObject(SomeInterface)
。 - new
delay
directive表示外部库(如DLL)在声明时不被加载,而是等到首先调用方法 - 类构造函数/析构函数
- 内在类型
string
现在映射到UnicodeString
; - 泛型;
-
函数默认(T):T
内在函数(Undocumented) - 智能指针;
- 匿名方法;
- 支持嵌套异常和异常跟踪;
- 支持指针和新的编译器指令:
{$ POINTERMATH ON | OFF}
; - 四个新的编译器警告:
-
W1057从'%s'到'%s'
, -
W1058从'%s'到'%s'潜在数据丢失的隐式字符串转换
, -
W1059从'%s'到'%s'的显式字符串转换
, -
W1060从'%s'到'%s'潜在数据丢失的显式字符串转换
;
-
-
退出
函数可以使用指定结果的参数; -
resourcestrings
as Widestrings; -
TObject
有一个额外隐藏的指向TMonitor
的指针; -
已弃用
关键字现在可以附加文字
- 没有我所知道的语言更改;
请注意,Delphi 2007是一个非D2006的DCU将在D2007中保持不变; ; - (2007年的.NET个性引入仿制药)
- 增强记录;
- 运算符重载;
-
static
方法和属性; - 课堂助手;
- FastMM是默认的内存管理器;
-
strict
private / protected visibility keyword ;虚拟方法的 -
final
关键字; -
{$ METHODINFO}
指令;
-
for ... in
循环, -
inline
关键字 - 允许使用声明中的通配符
- 嵌套类型
- 嵌套常量
-
{$ REGION}
/{$ ENDREGION}
指令
- 另外三个编译器警告:
- Unsafe_Type,
- Unsafe_Code和
- Unsafe_Cast。 这些警告默认情况下被禁用,但可以启用
- 新的编译器指令
{$ WARN UNSAFE_CODE ON}
- 使用
TFormatSettings
结构格式化和解析数字,日期时间值和货币的例程过载。
-
[TCustomVariantType] [68] code>为自定义变体类型提供运算符重载
- 新的编译器指令:
-
{$ IFDEF MSWINDOWS}
-
{$ IFDEF LINUX}
-
{$ LIBPREFIX}
-
{$ LIBSUFFIX}
-
{$ LIBVERSION}
-
{$ MESSAGE'讯息'}
-
{$ SetPEFlags}
-
- 支持
{$ IF} {$ ELSE}
编译器指令 - 编译器提示指令:
实验性
,deprecated
,library
,platform
(但不包含已弃用的附加文本) - 变体不再基于COM,但更改为CLX兼容,基于COM的变体重命名为
OLEVariant
- 键入的常量不能分配给(覆盖
{$ J +}
) - 枚举类型可以分配一个显式值(cf C ++);
- 界面属性
- 支持调用
varargs
外部函数(但仅适用于cdecl
调用约定) - 自定义变体
没有新的语言功能,但是:
- <一个href = http://www.drbob42.com/delphi4/dynarray.htmrel =nofollow noreferrer>动态数组
-
LongWord
和Int64
;Cardinal
是一个UINT32 (在未签名的31位值之前) -
Real
需要8个字节,与double
相同(以前是6个字节);
- 使用新的
{$ REALCOMPATIBILITY ON}覆盖
编译器指令; -
REAL48
替换旧的6字节真实
;
- 使用新的
- 支持
resourcestrings
- 方法重载
- 默认参数
-
{$ EXTERNALSYM}
和{$ NODEFINE}
指令 -
实现
关键字的属性
- Wordbool,longbool和bytebool存储
false
as-1
而不是1(布尔值不变) - 组件必须使用
packages
。 - 断言。
-
out
参数。 -
Widestring
-
界面
和dispinterface
关键字和COM(dispid
)支持。
$ b 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 Here are the links to the RAD Studio docwiki: The full list from Embarcadero: What's New To summarize: Delphi 10.3 (codename Carnival) (to be confirmed) Delphi 10.2 Tokyo (codename Godzilla) (to be confirmed) New compiler intrinsic routines (undocumented): The following new conditionals are introduced/enabled in XE4: At XE4, this changed so that $ENDIF became an accepted terminator for $IF, $IFDEF, $IFNDEF, and $IFOPT. Eight new DEFINEs have been added: ALIGN_STACK No new language features, but: 这篇关于德尔福语言特性列表及其引入/不推荐的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
Ansistring
将 shortstring
替换为默认字符串类型
货币
Variant
(用于与OLE自动化互操作)。
ThreadVar
关键字。
打包
关键字覆盖此行为;
1899/12/30
,开始于 0000/00 / 00
完成
关键字
注册
和 stdcall
添加调用约定。
包装
关键字。
- 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
See also: David I's list
[weak]
, [unsafe]
and [volatile]
attributes are supported on all compilers.
function IsManagedType(T: TypeIdentifier): Boolean;
function HasWeakRef(T: TypeIdentifier): Boolean;
function GetTypeKind(T: TypeIdentifier): TTypeKind;
function IsConstValue(Value): boolean;
needs device with ArmV6 + Neon or ArmV7 for deployment
introduces conditional define ANDROID
AUTOREFCOUNT
CPUARM
EXTERNAL_LINKER
IOS
NEXTGEN
UNDERSCOREIMPORTNAME
WEAKREF
WEAKINSTREF
WEAKINTREF
Note that much of the groundwork for ARC was already in XE3, but much of it was disabled $IF
statements could only be terminated with $IFEND
, and the $IFDEF
, $IFNDEF
, $IFOPT
directives could only be terminated with $ENDIF
.
AtomicExchange()
, AtomicIncrement()
, AtomicCmpExchange()
, AtomicDecrement()
Packed
Now Forces Byte Alignment of Records (Pre XE2 it did not necessarily do this)
CPUX86
CPUX64
MACOS (Mac operating system)
MACOS32
PC_MAPPED_EXCEPTIONS
PIC
WIN64 uses
clause.
{$STRINGCHECKS}
compiler directive is ignored in XE; {$ALIGN}
directive:
The acceptable values for the {$ALIGN}
directive now include 1, 2, 4, 8, and 16. {$CODEALIGN}
directive, this sets the starting address for a procedure or function. {$STRONGLINKTYPES ON}
directive
as
operator can be used to cast an interface reference back to the object from which it was extracted. is
operator can be used to verify whether an interface reference was extracted from a certain class. TObject(SomeInterface)
. 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
string
now maps to UnicodeString
; function Default(T): T
intrinsic function (Undocumented){$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
function can take a parameter specifying a result; resourcestrings
as Widestrings; TObject
has a extra hidden pointer to TMonitor
in addition to its VMT pointer; deprecated
keyword can now have additional text
Note that Delphi 2007 is a non-breaking release, DCU's from D2006 will work unchanged in D2007;
static
methods and properties; strict
private/protected visibility keyword; final
keyword for virtual methods; {$METHODINFO}
directive;
for ... in
loops, inline
keyword {$REGION}
/{$ENDREGION}
directives
{$WARN UNSAFE_CODE ON}
TFormatSettings
structure.
[TCustomVariantType][68]
provides operator overloading for custom variant types
{$IFDEF MSWINDOWS}
{$IFDEF LINUX}
{$LIBPREFIX}
{$LIBSUFFIX}
{$LIBVERSION}
{$MESSAGE 'message'}
{$SetPEFlags}
{$IF}{$ELSE}
compiler directives experimental
, deprecated
, library
, platform
(but without additional text for deprecated) OLEVariant
{$J+}
) varargs
external functions (but only for the cdecl
calling convention)
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);
{$REALCOMPATIBILITY ON}
compiler directive;REAL48
replaces the old 6-byte real
; resourcestrings
{$EXTERNALSYM}
and {$NODEFINE}
directives implements
keyword for properties
false
as -1
instead of 1 (Boolean is unchanged) packages
. out
parameters. Widestring
interface
and dispinterface
keyword and COM (dispid
) support.
Ansistring
replaces shortstring
as the default string typeCurrency
Variant
(for interop with OLE automation). ThreadVar
keyword. packed
keyword overrides this behavior; 1899/12/30
under D1 it started at 0000/00/00
finalization
keyword register
and stdcall
calling conventions added. packed
keyword.