Nick Hodges of CodeGear contacted me and gave me permission to talk about the upcoming Delphi 2007 for Win32 product - codenamed Spacely. Note that this review is based on a pre-release Beta build 2063 from mid February. Anything you see here is subject to change in the release version.
Here are a few screenshots of how the new installer looks like - click them to see them in full size. The installer has been created with InstallAware (which is also bundled with Delphi 2007) and it should allow CodeGear to release patches and potentially new versions in an easier and more integrated way.
Delphi 2007 is a non-breaking version
What does it mean that Delphi 2007 is a non-breaking version? Well, according to CodeGear roadmaps there will be a new BDS (or CDS?) version later this year code named Highlander. To reduce the pain (for developers, 3rd party component providers etc) of having two new full Delphi versions in less than a year, CodeGear decided to release Delphi 2007 as a non-breaking version. The result is that you should be able to use code and components designed for and compiled in BDS 2006 or Turbo Delphi 2006 without even recompiling any .dcu (delphi compiled unit) files. So even .dcu only shareware components should continue to just work.
Delphi 2007 is special in that it is (mostly) a non-breaking version in relation to BDS 2006 and Turbo Delphi 2006. This means that it is binary compatible at the .dcu level and no breaking changes has been made to the interface of any units. This means that there are no changes to existing classes or routines, for instance. Note that the Delphi unit interface checks are granular enough to allow new classes and identifiers to be added, as long as no existing identifiers are modified in any way.
A side-effect is that while it is relatively easy to fix RTL and VCL bugs (that only need changes in the implementation section), and to introduce new classes and components, it is very hard to introduce new functionality, methods and properties on existing classes. Hard, but not impossible, of course. CodeGear has not been shy to apply the odd hack or two to add native support for extended Vista Glass functionality in the TForm class, for instance. Allen Bauer has already spilled the beans on this and how it was achieved. We will take a closer look at the RTL and VCL changes in Delphi 2007 (relative to BDS 2006) further down in the review.
What's new in the compiler?
It also means that the compiler has not been updated with new features that would break binary compatibility, so there are no generics support yet, for instance. However, a little investigation shows that there have been improvements to the compiler. For instance, there are a slew of new compiler hints, warnings and errors. It also looks like the compiler has spiffed up its XML documentation generation capabilities. Some of the new error messages are probably due to bug fixes. Code that would earlier generate internal errors now generate clean compile-time errors with explanations of what is wrong with the code. Here is an example list of the new hints, warnings and errors that I've identified:
- H2445 Inline function '%s' has not been expanded because its unit '%s' is specified in USES statement of IMPLEMENTATION section and current function is inline function or being inline function
- H2451 Narrowing given WideChar constant (#$%04X) to AnsiChar lost information
- H2456 Inline function '%s' has not been expanded because contained unit '%s' uses compiling unit '%s'
- W1055 PUBLISHED caused RTTI ($M+) to be added to type '%s'
- W1201 XML comment on '%s' has badly formed XML -- 'Whitespace is not allowed at this location.'
- W1202 XML comment on '%s' has badly formed XML -- 'Reference to undefined entity '%s'.'
- W1203 XML comment on '%s' has badly formed XML -- 'A name was started with an invalid character.'
- W1204 XML comment on '%s' has badly formed XML -- 'A name contained an invalid character.'
- W1205 XML comment on '%s' has badly formed XML -- 'The character '%c' was expected.'
- W1206 XML comment on '%s' has cref attribute '%s' that could not be resolved
- W1207 XML comment on '%s' has a param tag for '%s', but there is no parameter by that name
- W1208 Parameter '%s' has no matching param tag in the XML comment for '%s' (but other parameters do)
- E2447 Duplicate symbol '%s' defined in namespace '%s' by '%s' and '%s'
- E2448 An attribute argument must be a constant expression, typeof expression or array constructor
- E2449 Inlined nested routine '%s' cannot access outer scope variable '%s'
- E2450 There is no overloaded version of array property '%s' that can be used with these arguments
- F2446 Unit '%s' is compiled with unit '%s' in '%s' but different version '%s' found
What's new in the IDE
In general the IDE feels very fast and nice to work with - it has noticeably less flickering when switching between debug and design layouts, for instance.
Here are a couple of screen shots showing some of the news in the IDE.
I've marked the changes with numbers:
- I've added a new toolbar button to toggle a debugger setting called Notify on Language Exceptions
- The new TForm property GlassFrame to control the Vista Glass effect on the form's area. This is achieved cunningly with class helpers, property injectors and some extra hacks.
- The Tool Palette has improved partial search matching. Any component that contains the string you're typing will be included in the list. So starting to type "but" will show all button components. This is great!
Here is a another screen shot.
- The new File Browser view is very handy. It works like a mini Explorer, reducing the need to use an external Explorer or File | Open all the time. And of course, this view can be docked anywhere - or you can keep it floating, or unpin it so that it scrolls away when you're not using it.
- The project's options for Compiler, Compiler Warnings, Linker and Directories/Conditionals can now be set separately for a Release and Debug configurations. In addition you can create more named configurations. Finally!
- Here you can again see the new compiler warnings that can be toggled on or off
- I added a Windows Vista specific component called TFileOpenDialog - the compiler issues a platform warning for this. Nice.
This review will be updated with more information and details in the coming few days. Stay tuned ;)