Monday, April 05, 2004

Essential Delphi 8 for .NET

There are a preview chapter available for downloading.
Something I got from this charper,
1. Initialization in D.net become the Static Class Method and called from Class Constructors
2. sets in D.net become the enumeration class (marked as sealed) that inherits from System.Enum.
3. the difference between record with methods and class in D.net is the way the use memory, the record is in stack and the class is in heap, so the record is a little bit more efficient.
4. StringBuilder is for increasing the performance of string concatenation. it is much faster than common string concatenation.
5. the Direct type cast became more restrictive in D.net. Integer (anObject) is no longer allowed
6. protected symbols defined in another unit are accessible only within the same assembly/package, but not across package boundary
7. ECO framework use Class Helper too, the Class Helper in D.net looks like the partial class in c#
8. published property in D.net become the BrowsableAttribute in CLR
9. Any class needing resource clean-up should implement the Dispose method of the IDisposable interface,
and add the 'using' clause in c#. the VM will free the object and resource in the the score of 'using' clause, this way eliminate the delay of GC.
in D.net, the Destroy() method becomes an implementation to Dispose. nice
10. However the Delphi 8 compiler cannot impose the presence of a specific metaclass for classes not
compiled by Delphi but imported from assemblies written in other languages.


No comments: