Language and Compiler Features Since Delphi 7
from:
http://edn.embarcadero.com/cn/article/34324
Language and Compiler Features Since Delphi 7 |
|
| Inlining | Routines can now be marked with the inline directive. This tells the compiler that, instead of actually calling the routine, it should emit code that includes the routine at the call site. |
| Operator Overloading |
Delphi allows certain functions, or operators, to be overloaded within record declarations TMyClass = |
| Class Helpers |
A class helper is a type that - when associated with another class - introduces additional method names and properties which may be used in the context of the associated class (or its descendants). Class helpers are a way to extend a class without using inheritance. A class helper simply introduces a wider scope for the compiler to use when resolving identifiers. When you declare a class helper, you state the helper name, and the name of the class you are going to extend with the helper. You can use the class helper any place where you can legally use the extended class. The compiler's resolution scope then becomes the original class, plus the class helper. Class helpers provide a way to extend a class, but they should not be viewed as a design tool to be used when developing new code. They should be used solely for their intended purpose, which is language and platform RTL binding.
|
| strict private | The private keyword actually creates a " friendship" relationship between classes in the same unit. The strict private declaration creates a true private field, not viewable by any other class, not even classes in the same unit. |
| strict protected | Similar to the strict private declaration, strict protectedcreates a true protected member, visible only to the declaring class and its descendents. |
| Records with Methods |
In addition to fields, records now may have properties and methods (including constructors), class properties, class methods, class fields, and nested types.
|
| class abstract |
Classes, and not just methods, can be declared as abstract.
|
| class sealed | Classes marked as sealed cannot be inherited from.
|
| class const | Classes can now have class constants -- a constant value associated with the class itself and not an instance of the class.
|
| class type | A class can now contain a type declaration that is usable only within that class.
|
| class var | A class can also have a class variable, applicable only to the class and not an instance of the class. See "class type" for an example. |
| class property | A class can have a class property, which is a property that applies only to the class reference and not to an instance of a class. The accessors for the class property must be either class methods or class variables. See the example in "static class methods" below. |
| nested classes | Type declarations can be nested within class declarations. They present a way to keep conceptually related types together, and to avoid name collisions.
|
| final methods | A virtual method that you override can now be marked final, preventing derived classes from overriding that method.
TAbstractClass = classabstract |
| sealed methods | Classes marked as sealed cannot be descended from. See the example in 'final methods'. |
| static class methods | Classes can have static class methods -- i.e. methods that can be called from a class type. Class static methods can be accessed without an object reference. Unlike ordinary class methods, class static methods have no Self parameter at all. They also cannot access any instance members. (They still have access to class fields, class properties, and class methods.) Also unlike class methods, class static methods cannot be declared virtual.
|
| for-in loop | Delphi 2007 for Win32 supports for-element-in-collection style iteration over containers. The following container iteration patterns are recognized by the compiler:
|
Language and Compiler Features Since Delphi 7的更多相关文章
- Massive Collection Of Design Patterns, Frameworks, Components, And Language Features For Delphi
Developer beNative over on GitHub has a project called Concepts which is a massive collection of Del ...
- Advanced Features of Delphi DLLs
http://www.delphisources.ru/pages/faq/master-delphi-7/content/LiB0104.html Beside this introductory ...
- Calling 64-bit assembly language functions lodged inside the Delphi source code
Code: http://www.atelierweb.com/calling-64-bit-assembly-language-functions-lodged-inside-the-delphi- ...
- an excellent capability of C# language and compiler
Sometimes you want to write code that works for different primitive types, and as C# doesn't support ...
- Delphi Language Overview
Delphi is a high-level, compiled, strongly typed language that supports structured and object-orient ...
- The CompilerVersion constant identifies the internal version number of the Delphi compiler.
http://delphi.wikia.com/wiki/CompilerVersion_Constant The CompilerVersion constant identifies the in ...
- Delphi CompilerVersion Constant / Compiler Conditional Defines
http://delphi.wikia.com/wiki/CompilerVersion_Constant The CompilerVersion constant identifies the in ...
- Delphi 和 C++Builder 2014年及以后技术路线图
RAD Studio, Delphi 和 C++Builder 2014年及以后技术路线图 By: Embarcadero News 内容源自Embarcadero新闻组,本人水平有限,欢迎各位高人修 ...
- Delphi XE5教程3:实例程序
内容源自Delphi XE5 UPDATE 2官方帮助<Delphi Reference>,本人水平有限,欢迎各位高人修正相关错误! 也欢迎各位加入到Delphi学习资料汉化中来,有兴趣者 ...
随机推荐
- 构建-14 Gradle使用技巧
官方文档 Gradle 提示与诀窍 [Gradle tips and recipes] Gradle 和 Android Plugin for Gradle 提供了一种灵活的方式[a flexible ...
- laravel中的自定义函数的加载和第三方扩展库加载
l 1. 创建文件 app/Helpers/functions.php <?php // 示例函数 function foo() { return "foo"; } 2. 修 ...
- 用于文本分类的RNN-Attention网络
用于文本分类的RNN-Attention网络 https://blog.csdn.net/thriving_fcl/article/details/73381217 Attention机制在NLP上最 ...
- 【R】函数-统计函数
- hdu 5411 CRB and Puzzle (矩阵高速幂优化dp)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5411 题意:按题目转化的意思是,给定N和M,再给出一些边(u,v)表示u和v是连通的,问走0,1,2... ...
- 分享几套生成iMac相关高逼格免费mockup的素材和在线工具
好久没有过来转, 今天姐姐我分享几套高逼格的iMac相关设计资源, 希望各位靓妹帅哥会喜欢, 最重要滴是,都是FREE,此处应有掌声~~~ , yeah!! iMac桌面效果Mockup 只需要下载后 ...
- jquery效果 窗口弹出案例
效果 ①基本效果:show().hide().toggle() ②滑动 slideDown().slideUp().slideToggle() 划上:$("p").slideUp( ...
- GDB和GDB Server
gdb是linux c编程标配的调试工具,平时接触比较多的可能是本机随gcc一起安装的调试工具.但是,即使是本机的gdb,也经常被printf代替,所以接触也仅限于知道. 简单程序固然可以用print ...
- PhpStorm 2017.1安装及破解过程
1.下载原安装文件和破解文件:magnet:?xt=urn:btih:7FD357910B7AFBFC8FBA3647A2FAC8F15F0D02F0 (直接放到迅雷里下载) 2.Licence S ...
- 缓慢变化维 (Slowly Changing Dimension) 常见的三种类型及原型设计(转)
开篇介绍 在从 OLTP 业务数据库向 DW 数据仓库抽取数据的过程中,特别是第一次导入之后的每一次增量抽取往往会遇到这样的问题:业务数据库中的一些数据发生了更改,到底要不要将这些变化也反映到数据仓库 ...