Win32 Delphi language features introduced since Delphi 7

Hi, 

Am I right in thinking that the language features introduced since Delphi 7 fall into the categories: 
a) language features dictated by .Net compatibility. e.g. Namespaces, Inlining, records with methods, operator overloading, pure interfaces, generics, extended RTTI and reflection; 
b) Unicode strings and supporting procedures? 
c) 64-bit support 

What other language features, if any, have been introduced since D7? 

Had most of the post-D7 languages features, except for generics, Unicode strings, and 64-bit support, been introduced in or before Delphi 2005? How bug-free were the post-D7 language features that were available in Delphi 2005 at the time of Delphi 2005? 

When Win32 generics were introduced in Delphi 2009 I seem to remember that there were various mutterings in the NG's about of buggy behaviour of the initial generics implementation. Have the bugs been fixed in Delphi XE? 

On the subject of Generics, I understand that a Delphi generic class is compiled independently of any constructed classes derived from it (unlike C++ templates, which are effectively resolved at source code level at compile time). When several constructed classes that substitute distinct actual types for the parametric types in the same generic class are compiled, is the code in the generic class that in theory is common to all the constructed classes replicated in each constructed class? (I would have th
ought so, because the local variable addresses will in general be different for each constructed class.) When calling a generic method with a parametric type parameter, must the type of the actual parameter   exactly match the type of parameter in the constructing class, or may it be merely assignment-compatible with it? 

Do the SysUtils and VCL libraries in the current version of Delphi make much use of generics? 

TIA, 

EM
0
Enquiring
4/30/2012 1:58:00 PM
embarcadero.delphi.non-tech 5933 articles. 1 followers. Follow

8 Replies
878 Views

Similar Articles

[PageSpeed] 19

> {quote:title=Enquiring Mind wrote:}{quote}
> Am I right in thinking that the language features introduced since Delphi 7 fall into the categories: 
> a) language features dictated by .Net compatibility. e.g. Namespaces, Inlining, records with methods, operator overloading, pure interfaces, generics, extended RTTI and reflection; 
> b) Unicode strings and supporting procedures? 
> c) 64-bit support 
> 
> What other language features, if any, have been introduced since D7? 

I'll leave it to someone else to argue the relative merits of the changes and decide how to categorise them, but there's a pretty comprehensive list in the documentation.  You have to go back to blog posts for Delphi 2005 and 2006.

http://docwiki.embarcadero.com/RADStudio/en/What%27s_New_in_Delphi_and_C%2B%2BBuilder_XE2
http://docwiki.embarcadero.com/RADStudio/en/What%27s_New_in_Delphi_and_C%2B%2BBuilder_XE
http://docwiki.embarcadero.com/RADStudio/en/What%27s_New_in_Delphi_and_C%2B%2BBuilder_2010
http://docwiki.embarcadero.com/RADStudio/en/What%27s_New_in_Delphi_and_C%2B%2BBuilder_2009
http://docwiki.embarcadero.com/RADStudio/en/What%27s_New_in_RAD_Studio_%28Delphi_for_Win32_2007%29
http://edn.embarcadero.com/article/33411
http://edn.embarcadero.com/article/32778


There's been a bunch of third party discussion on the subject, too.

http://edn.embarcadero.com/article/37416
http://blogs.embarcadero.com/nickhodges/2007/03/28/33579
http://edn.embarcadero.com/article/34324
http://edn.embarcadero.com/article/34323
http://edn.embarcadero.com/article/34325
http://www.tindex.net/
http://www.stevetrefethen.com/blog/VCLandRTLenhancementssinceDelphi7%28D7%29.aspx
http://delphi.wikia.com/wiki/Enhancements_since_Delphi_7
http://delphi.cjcsoft.net/viewthread.php?tid=47692

There are also a lot of subtle changes and improvements that might never merit a blog post, but add to the over all experience.  

To be honest, I forget that I rely on certain things until I have to go back to a version that doesn't support something like debug visualisers, build events or designer guidelines.

--
Regards
Bruce McGee
Glooscap Software
0
Bruce
4/30/2012 3:09:45 PM
> Am I right in thinking that the language features introduced since
> Delphi 7 fall into the categories: a) language features dictated by
> .Net compatibility. e.g. Namespaces, Inlining, records with methods,
> operator overloading, pure interfaces, generics, extended RTTI and reflection; 

This category conflates two things: language features originally added for Delphi.NET compatibility, and language features inspired by .NET. In particular, extended RTTI postdates the death of Delphi .NET - while the Delphi attributes syntax (which is a part of extended RTTI) reuses the syntax for attributes in Delphi.NET, the extended RTTI interface only vaguely resembles the .NET reflection one. Similarly, the generics syntax in the main Delphi compiler reuses the Delphi.NET generics syntax, however the
 stock generic collection classes, while clearly inspired by the .NET equivalents, are their own thing - you don't use them because someday Delphi.NET might be resurrected, allowing you to cross compile.

That said, I don't know why you have included inlining in amongst .NET talk at all.

> b) Unicode strings and supporting procedures? 

Funnily enough, core Unicode 'supporting procedures' (actually classes) *were* originally designed for .NET compatibility (Delphi.NET was only dropped shortly before D2009 was released acording to reports). However, they have diverged slightly since,

> c) 64-bit support 
> 
> What other language features, if any, have been introduced since D7? 

Is this like the 'but what have the Romans ever done for us?' sketch...?

> Had most of the post-D7 languages features, except for generics,
> Unicode strings, and 64-bit support, been introduced in or before
> Delphi 2005?

How could something post-D7 have been introduced to the main Delphi compiler before D2005, assuming public releases? That said, there were various things added informally in D2005 that were only officially added in D2006 (http://blogs.teamb.com/rudyvelthuis/2005/05/13/4311).

> How bug-free were the post-D7 language features that were
> available in Delphi 2005 at the time of Delphi 2005? 

Personally, I only found language features added in D2005 and D2006 stable in D2007, despite the marketing of the time claiming the D2007 compiler was identical to the D2006 one (it wasn't - it was better).

> When Win32 generics were introduced in Delphi 2009 I seem
> to remember that there were various mutterings in the NG's
> about of buggy behaviour of the initial generics implementation.
> Have the bugs been fixed in Delphi XE? 

Still aren't perfect, particularly on the IDE side, but you wouldn't want them taken out

> is the code in the generic class that in theory is common to all
> the constructed classes replicated in each constructed class? 

Yes.

> When calling a generic method with a parametric type parameter, must
> the type of the actual parameter   exactly match the type of parameter
> in the constructing class, or may it be merely assignment-compatible with it? 

Your question is too vague - be more specific, preferably with some sample code. 

> Do the SysUtils and VCL libraries in the current version of Delphi make much use of generics? 

Is this going anywhere?
0
Chris
4/30/2012 3:32:34 PM
> {quote:title=Bruce McGee wrote:}{quote}
> 
> I'll leave it to someone else to argue the relative merits of the changes and decide how to categorise them, but there's a pretty comprehensive list in the documentation.  You have to go back to blog posts for Delphi 2005 and 2006.
> 
> http://docwiki.embarcadero.com/RADStudio/en/What%27s_New_in_Delphi_and_C%2B%2BBuilder_XE2
<snip> 
> 
> There's been a bunch of third party discussion on the subject, too.
> 
> http://edn.embarcadero.com/article/37416
> http://blogs.embarcadero.com/nickhodges/2007/03/28/33579
<snip>
 
> There are also a lot of subtle changes and improvements that might never merit a blog post, but add to the over all experience.  
> 
> To be honest, I forget that I rely on certain things until I have to go back to a version that doesn't support something like debug visualisers, build events or designer guidelines.
> 

I appreciate the time you took to pull together the comprehensive list of useful references - many thanks.

Regards,

EM
0
Enquiring
5/1/2012 8:54:52 AM
> {quote:title=Chris Rolliston wrote:}{quote}
> 
> This category conflates two things: language features originally added for Delphi.NET compatibility, and language features inspired by .NET. In particular, extended RTTI postdates the death of Delphi .NET - while the Delphi attributes syntax (which is a part of extended RTTI) reuses the syntax for attributes in Delphi.NET, the extended RTTI interface only vaguely resembles the .NET reflection one. Similarly, the generics syntax in the main Delphi compiler reuses the Delphi.NET generics syntax, however t
he stock generic collection classes, while clearly inspired by the .NET equivalents, are their own thing - you don't use them because someday Delphi.NET might be resurrected, allowing you to cross compile.
> 
I was referring to compatibility of the Delphi language feature set with the C# language feature set, so I guess this covers both features for .Net compatibility and features inspired-by/equivalent-to C# features. 

> That said, I don't know why you have included inlining in amongst .NET talk at all.
> 
I understand that because C#  requires all properties to map to functions/procedures and therefore for speed reasons are often compiled as in-line expansions rather than sub routine calls, in-line procedures were included in the feature set dictated/inspired by C#. They are also desirable for efficiency of operator overloading.

> > b) Unicode strings and supporting procedures? 
> 
> Funnily enough, core Unicode 'supporting procedures' (actually classes) *were* originally designed for .NET compatibility (Delphi.NET was only dropped shortly before D2009 was released acording to reports). However, they have diverged slightly since,

Thanks for that.
> 
> > c) 64-bit support 
> > 
> > What other language features, if any, have been introduced since D7? 
> 
> Is this like the 'but what have the Romans ever done for us?' sketch...?
Not too familiar with the Monty Python sketch, I'm afraid. But if you mean that not many  language features other than those in the categories mentioned have been introduced, that could well be considered a good thing,
> 
> > Had most of the post-D7 languages features, except for generics,
> > Unicode strings, and 64-bit support, been introduced in or before
> > Delphi 2005?
> 
> How could something post-D7 have been introduced to the main Delphi compiler before D2005, assuming public releases? That said, there were various things added informally in D2005 that were only officially added in D2006 (http://blogs.teamb.com/rudyvelthuis/2005/05/13/4311).

Introduced in or before D2005. The last printed edition of Mastering Delphi, on Delphi 2005, mentions most of the .Net-related language extensions. 
> 
> > How bug-free were the post-D7 language features that were
> > available in Delphi 2005 at the time of Delphi 2005? 
> 
> Personally, I only found language features added in D2005 and D2006 stable in D2007, despite the marketing of the time claiming the D2007 compiler was identical to the D2006 one (it wasn't - it was better).

Thanks for sharing this experience. Will make me think twice before spending much time with D2005 for the sake of using the .Net-related language extensions.
> 
> > When Win32 generics were introduced in Delphi 2009 I seem
> > to remember that there were various mutterings in the NG's
> > about of buggy behaviour of the initial generics implementation.
> > Have the bugs been fixed in Delphi XE? 
> 
> Still aren't perfect, particularly on the IDE side, but you wouldn't want them taken out

I take it that Delphi generics are reliable as far as the compiler and the generated code are concerned?
> 
> > is the code in the generic class that in theory is common to all
> > the constructed classes replicated in each constructed class? 
> 
> Yes.
> 

> > When calling a generic method with a parametric type parameter, must
> > the type of the actual parameter   exactly match the type of parameter
> > in the constructing class, or may it be merely assignment-compatible with it? 
> 
> Your question is too vague - be more specific, preferably with some sample code. 
> 
I guess that I am obliquely alluding to covariance/contravariance issues. I would expect that pre-existing type compatibility rules for procedure arguments continue to apply.

> > Do the SysUtils and VCL libraries in the current version of Delphi make much use of generics? 
> 
> Is this going anywhere?
I guess the point that you made about Delphi now providing stock generic collection classes inspired by .Net collection classes partly answers this question. The purpose of the question is to get a feel for whether generics have been used to improve the Delphi  inherited pre-existing code base, or whether they have been used primarily in the development of new code.

Regards,

EM
0
Enquiring
5/1/2012 10:09:51 AM
> I was referring to compatibility of the Delphi language feature set
> with the C# language feature set, so I guess this covers both features
> for .Net compatibility and features inspired-by/equivalent-to C# features. 

'Compatibility' is the wrong word. Things were added to Delphi/Win32 back in the Delphi.NET days so you could cross compile with the .NET compiler - that's 'compatibility'. However, to be inspired by something is quite different to desiring 'compatibility' with it. E.g., Turbo Pascal's OOP extensions were 'inspired' by both Apple's Object Pascal and C++, but they weren't 'compatible' with either.

> > That said, I don't know why you have included inlining in amongst .NET talk at all.
> > 
> I understand that because C#  requires all properties to map to functions/procedures
> and therefore for speed reasons are often compiled as in-line expansions rather than
> sub routine calls, in-line procedures were included in the feature set dictated/inspired
> by C#. They are also desirable for efficiency of operator overloading.

Perhaps the work on inlining was done when support was added in the .NET compiler, but to speak of this being a '.NET' feature doesn't make much sense, sorry. Take a look at where the inline directive has been added in the Delphi RTL - properties don't come into it; instead, the directive has been applied to trivial standalone functions or trivial method overloads.

> Will make me think twice before spending much time with D2005 for
> the sake of using the .Net-related language extensions.

If you haven't already, you don't want to bother 'spending time' with anything between D7 and D2007, and similarly, between D2007 and XE (or that matter, anything earlier than D7, which is old enough). Also, there's no need to use a version with Delphi .NET just to use 'the .NET-related language extensions'.

> I take it that Delphi generics are reliable as far as the compiler and the generated code are concerned?

Any use like the stock collection classes put them to is fine.

> I guess that I am obliquely alluding to covariance/contravariance
> issues. I would expect that pre-existing type compatibility rules for
> procedure arguments continue to apply.

Correct.
0
Chris
5/1/2012 11:20:05 AM
> {quote:title=Enquiring Mind wrote:}{quote}
> 
> What other language features, if any, have been introduced since D7? 

I made a complete list of new language features for a user group presentation. That list formed the basis of the The TIndex.

http://www.tindex.net

Lachlan
0
Lachlan
5/1/2012 12:24:57 PM
> {quote:title=Lachlan Gemmell wrote:}{quote}
> > {quote:title=Enquiring Mind wrote:}{quote}
> > 
> > What other language features, if any, have been introduced since D7? 
> 
> I made a complete list of new language features for a user group presentation. That list formed the basis of the The TIndex.
> 
> http://www.tindex.net
> 
You did a great job!
0
Enquiring
5/1/2012 1:10:10 PM
> {quote:title=Enquiring Mind wrote:}{quote}
> I appreciate the time you took to pull together the comprehensive list of useful references - many thanks.

Sometimes it's easy to forget how far the product has come, so it's good to see Embarcadero documenting their progress.  Lauchlan's list is very cool and up to date, too.

--
Regards
Bruce McGee
Glooscap Software
0
Bruce
5/1/2012 2:22:43 PM
Reply:

Similar Artilces:

Language like Delphi 6 or Delphi 7
Hi I like to make application what will connect to web services(SOAP or REST) and send data to server via HTTPS. I have previous experience with Delphi 6 and Delphi 7.I know that language in Delphi 2009 is changed. Which is the last Delhi(Delphi 2005, Delphi 2009) what have the languages like Delphi 6 or Delphi 7. Additional ,which edition(home,professional ,architect) I should use if i like to achieve my task? Pero perov wrote: > I know that language in Delphi 2009 is changed. That is not true. > Which is the last Delhi(Delphi 2005, Delphi 2009) what > have the lan...

Win32 program: Delphi 7 vs Delphi XE5
How is a D7 Win32 program compared to a Delphi XE5 one in terms of stability and performance? Is Delphi XE5 good enough for a big ERP project with several DLL's and hundreds of units and forms? Thanks in advance Am 26.12.2013 15:02, schrieb lior ilan: > How is a D7 Win32 program compared to a Delphi XE5 one in terms of stability > and performance? > Is Delphi XE5 good enough for a big ERP project with several DLL's and > hundreds of units and forms? > Thanks in advance > Hello, XE5 has increased functionality. Stability seems to be ok for most ...

Delphi 7 to Delphi XE2
Hi, Still using that old workhorse, Delphi7, but am going to the conference in London hosted by Embarcadero on Delphi XE2. Although I would like to "move with the times" and am keen to get the UNICODE and 64-bit support offered by the latest IDEs, I confess to being more than a little scared about all the UNICODE/String/AnsiString and 32/64 bit issues I'm probably going to fall over. Anyone recently upgraded from Delphi7 to one of the latest Delphi IDEs? Thanks, Alain On 03/02/2012 08:55, Alain Dekker wrote: > Still using that old workhorse, Delphi7, but...

Delphi 7 to Delphi XE
Have been using Delphi 7 for many moons ( have got later versions but never upgraded to ) My first problem is: Component Palette. in XE it is a small toolbar docked in top right in Delphi 7 it gives a large view of all the components. I am struggling to be able to cope/access my components.in Delphi XE. Can I make the component pallette tool bar the same size as Delphi 7, or is there a fast way to view/choose all available components in XE, that I have not spotted yet? Kind Regards, Robert. Hi, What I know is that in Delphi 2010 and XE you can choose between t...

Delphi 2007 to Delphi 7
I've written a class in Delphi 2007 that is not supported in Delphi 7. What would be the best way to achive what I've done in Delphi 2007 in Delphi 7? Thanks, Tom type BondConstants = class { Bond Types } type BondType = record const TREASURY = 3; AGENCY = 0; CORP = 1; MUNI = 2; SBA = 5; MBS = 4; CMO = 6; end; { Day Count Methods } type DayCount = record const ACTUAL_360 = 2; ACTUAL_365 = 1; ACTUAL_ACTUAL = 1; d30_360 = 0; ...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

Migrating From Delphi 7 to Delphi 2010
We did not know which forum was the best for this question. We have been wanting to migrate from Delphi 7 to a later version for years but it appears to be a daunting task. We first looked at D2006 and that was a radical new world. We bought D2010 a couple of years ago and not done much with it because there are so many parts to our applications. We have done a few new applications in D2010 and they seem to work okay. D2010 has not been impressive, perhaps because of the strangeness compared to D7. Is is possible for us to do a phased sort of migration where we do a form at a time? ...

Migrating from Delphi 7 to Delphi XE3
Hello, Its time to leave the old Delphi 7 and move to the new (but not the latest) XE3. I was wondering if there is a good book or reference to learn all new things XE3 added. Any suggestions? On 5/3/2013 10:17 PM, George Karatsiolis wrote: > Hello, Its time to leave the old Delphi 7 and move to the new (but not the latest) XE3. > I was wondering if there is a good book or reference to learn all new things XE3 added. Try this one for starters: http://tinyurl.com/cgsu243 Aside from that you really need to evaluate your application. XE3 is Unicode for example.... So her...

Delphi 2007 RTL in Delphi 7
I read somewhere that it is possible to use Delphi 2007's (or for that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the source of RTL. Is this really possible? What are the benefits that we can derive using a higher version's RTL? TIA Yogi Yang Yogi Yang wrote: > I read somewhere that it is possible to use Delphi 2007's (or for > that matter Delphi 2006's) RTL in Delphi 7 by just recompiling the > source of RTL. If it actually compiles in Delphi 7, I guess it would be possible. OTOH, if one has Delphi 2007 already, I don't s...

Moving from Delphi 7 to Delphi 2007
Is there any compelling reason to move (quite a large project) from Delphi 7 to Delphi 2007? Specifically, is there better Vista/Win7/Win8 integration provided by Delphi 2007? (In the project I am already using a custom manifest file for Vista/Win7 etc.. and not the std XPMan component) Does 2007 add any new bugs to the scene? Thanks Rael Rael wrote: > Is there any compelling reason to move (quite a large project) from > Delphi 7 to Delphi 2007? If you are going to upgrade, why not upgrade to something newer? > In the project I am already using a custom man...

Delphi 7 to Delphi 2009 conversion
Hello group, What do I need to do to comile the following code in D2009. Compiler error after the Else E2010: Incompatible Types 'AnsiChar' and 'Char' if isUnicode then SearchHandle := FindFirstFilew( PWideChar( fn ), FindDataW ) else SearchHandle := FindFirstFile( PAnsiChar( Ansistring( fn ) ), FindDataA ); <<<<<compiler error in the above line >>>>>>>>>>> Regards, Bryan > What do I need to do to comile the following code in D2009. > Compiler error after the Else > E2010: Incompati...

I wrote an application and used cracked delphi 7, after i bought delphi 7
I wrote an application and used cracked delphi 7, I sold it, after i bought delphi 7 and recompiled application, is now my application legal or? > {quote:title=Ivan Ivanov wrote:}{quote} > I wrote an application and used cracked delphi 7, I sold it, after i bought delphi 7 and recompiled application, is now my application legal or? "I embezzled some money from my employer, returned the funds, and then got it back as a bonus. Can I still be arrested?" Uhhh .... didn't you just confess to a crime? > {quote:title=Ivan Ivanov wrote:}{quote} > I wrote an appli...

Unofficial Delphi 7 updates
Anybody noticed, even tried this Enhanced Run Time library for Delphi ? It's a hack of the D7 RTL/VCL http://blog.synopse.info/post/2009/12/20/Enhanced-Run-Time-library-for-Delphi-7 It's very interesting and I'd like to know it's stability. Edwin Ye wrote: > Anybody noticed, even tried this Enhanced Run Time library for Delphi > ? It's a hack of the D7 RTL/VCL This library violates Delphi's license (redistributing of RTL/VCL source files is not allowed). The last post was deleted and I'm sure this one will be deleted, too. -- Andreas H...

Web resources about - Win32 Delphi language features introduced since Delphi 7 - embarcadero.delphi.non-tech

Introduced species - Wikipedia, the free encyclopedia
An introduced , alien , exotic , non-indigenous , or non-native species , or simply an introduction , is a species living outside its native ...

F8: Facebook Audience Network Officially Introduced
Facebook’s long-rumored mobile ad network is now a reality, as the social network officially introduced its Facebook Audience Network Wednesday ...

Samsung Introduced New 2G, 3G Folder Phones for Respected Old Generations - Flickr - Photo Sharing!
Samsung Electronics said on Thursday that it will introduce user-convenient 2G and 3G folder phones under the brand name of ‘Samsung Master’ ...

Toronto Zoo Polar Bear Cub Introduced to Snow for the First Time - YouTube
Born on November 9th 2013, our adorable cub is currently residing in the Wildlife Health Centre. During his stay, our newest polar bear family ...

Health and safety display cards for Dubai restaurants to be introduced
Restaurants rated "critical" and "dangerous" be inspectors will have a red card posted.

Burqa law introduced in WA parliament
A new law that would require Muslim women to remove a burqa or niqab to prove their identity to West Australian police has been introduced to ...

NYC Entrepreneur Slams 'Wolf Of Wall Street' Scene In Which Jordan Belfort Is Introduced To His Future ...
The role of “Naomi,” played by Margot Robbie, is based on Belfort’s real-life second wife, Nadine, to whom he was married for seven years and ...

Heathrow Airport Boarding Checkpoints to be Introduced
Is there a way to speed up the process of getting through an airport? Some airports think so.

Greg Inglis’ Father’s Day surprise: secret son introduced on Instagram - DailyTelegraph Search Search ...
GREG Inglis has chosen Father’s Day to make a stunning revelation, introducing the world to his secret son.

Video: Honey Badger Nick Cummins introduced as “Honey Bear” by US reporter
THEY say a leopard can&#8217;t change its spots but it appears a Honey Badger can.

Resources last updated: 11/23/2015 7:01:11 PM