This post continues the series of The Delphi Language Chapter teasers from Jon Shemitz’ .NET 2.0 for Delphi Programmers book.
The previous post showed how to use the mysterious P/Invoke features. This time we'll list the Win32 specific features of the language and RTL that didn't make it to the .NET side.
Note that I do not get any royalties from the book and I highly recommend that you get your own copy – for instance at Amazon.
"Obsolete features
Due to the managed and garbage collected nature of the .NET environment, a number of native Win32 specific features had to be left out in the Delphi for .NET language. Most of these are already warned against when you compile with the Win32 compiler, easing the porting process.
Feature | Comment |
Pointers | Including PChar, @ operator, GetMem, etc. See Unsafe code |
absolute | Variable overlaying not supported |
Real48 | This is a relic from the Borland Pascal (BP) days |
File of <type> | Size of records are not fixed in .NET |
BlockRead, BlockWrite | Size of records are not fixed in .NET |
Old-style objects | Really a relic from BP – deprecated since Delphi 1 |
BASM | Built-in Assembler – is specific to x86 and native code |
IUknown | No longer has AddRef, Release and QueryInterface |
implements | Interface delegation, not implemented yet |
automated, dispid | OLE Automation not supported |
"
Old-style objects Really a relic from BP – deprecated since Delphi 1
ReplyDeleteWhich is a pity, because it's much cleaner that that piece of junk they introduced as 'Tobject'. Conceptually sound, implementationwise nothing but codebloat.