Reminds me of a post I did on the mailing list back in 2015 
(TL;DR - friday afternoon wishful thinking)
Leaked details of the next version of Delphi are doing the rounds( well, of an office in Canberra at least).
Tentatively called the Delphi 11 Canberra, Autumn 2016 Southern Hemisphere Release (beta name is Project Phoenix), some interesting and very welcome details have come to light.
A Brand New IDE
Delphi 11 will have a completely new cross platform IDE (Windows, Mac OSX and Linux), written using the hugely enhanced FMX/Firemoney framework (see more on that later). The IDE has been written from the ground up with extensibility in mind. Apparently the IDE dev team was broken into two teams, one that work on the IDE framework and extensibility api, and another that worked on the Delphi/C++ IDE features, using the IDE api. The IDE extensibilty api is fully documented, and installing plugins is simple. Third parties will be able to create and publish IDE plugin packages, ranging from simple tools to full language support.
Developer Tools evangelist, David Firehose expects there to be a lot of activity in the IDE plugin market. One example he cited, was the ability to write refactoring & code analysis tools without resorting to parsing the code in the plugin, because the new IDE exposes the same AST that is used by (the now fully working) Code Insight. Incidentally, the parser used by the IDE for Code Insight is the same as the one used for the compiler, so the broken “TObject does not have a method named Free” red squiggles are now a thing of the past.
I’m told that this IDE will also be the basis for new Python, Java and Web tools in the near future (much like Jetbrains’ WebStorm).
FireMonkey Ex
Firemonkey has benefited from a complete rewrite (now called FireMonkey Ex) with the focus on native platform support and performance. This continues a trend started with XE8, but goes much further. Whilst this makes it impossible to write once run anywhere, Delphi’s form designer makes it simple to maintain platform specific versions of the form. FireMonkey Ex uses a MVC like architecture, which discourages developers from writing all their code in the form. It also has a baked in query facility (so you can do linq queries to access/select controls) as well as a much enhanced (performance wise) live binding. This is not your fathers VCL!
Want to refresh only certain controls, well instead of writing a bunch of recursive code to find and refresh the controls, you can just do :
Self.Controls.Where( x => x.HasProperty(‘repaintMe’) or x.IsType).Do( c => c.Refresh);
This makes it possible to operate on controls on a form, without a) knowing their names, or having references to them, or b) knowing if the form actually exists. For example, a third party control could extend other controls on a form just by running a query like above.
If the syntax seems a bit foreign, don’t worry, just keep reading, all will be revealed!
In addition, issues with text rendering, canvas performance etc are a thing of the past. Firemonkey Ex also benefits from some major compiler performance improvements, and use of the GPU where possible. FireMonkey on Windows is now almost on a par with VCL as far as the standard controls go, so it’s now quite feasible to write a line of business type application using it.
VCL Ex
Recognising that there are millions (ok, thousands) of VCL applications out there, and plenty of VCL only Delphi developers, Delphi 11 includes a new version of the VCL. Every control has been visited, the result being a compatible (with earlier versions) but much improved VCL framework. Every line of code was reviewed, and all reported bugs which could be reproduced were fixed. Anchors and Alignment code was dramatically improved. The VCL now includes facilities to delay painting until needed, ie a BeginUpdate/EndUpdate facility is baked in to all controls, making flicker free resizing the norm. The painting cpu overhead has also been significantly reduced. VCL Theming is also much improved.
High DPI support is fully fleshed out, with font scaling working as well as any other windows application I have seen. The IDE also includes a windows manifest file editor.
Compilers
Perhaps the biggest surprise in Delphi 11 Canberra, is the announcement of an all new compiler architecture. After doing battle with LLVM for the last few years, the team went back to doing something they used to be good at, writing worlds best compilers.
A completely new compiler front end, written in Delphi, and new backends for each platform (Win32, Win64, OSX, Linux Arm, Linux Intel, Andriod Arm, Android Intel, iOS).
Chief Compiler Architect, Andy Hejl, said the team was excited to be working on an all new compiler architecture. Whilst the first iteration of the new compiler did not perform well (due to being compiled with the current compiler), after the compiler had reached conformity and was able to compile itself, a massive boost was seen. Andy credited the huge performance boost to the work done by the back end team, which made heavy use of modern cpu features. The current compilers are still generating for 386 era cpus. The new compiler also implements some sophisticated optimisation techniques, which combined with the new codegen, make for smaller, faster executables. Andy said they worked closely with Intel (on the intel based compilers), and said the codegen and performance was on a par with the intel C++ compilers. Asked about generics code bloat, Andy said the new optimiser was smart enough to deal with this, and it would no longer be a problem (much of the generic collections classes were rewritten with this in mind too). He also mentioned that the compiler was able to recognise certain patterns, like enumerators, and optimise the code gen, so for example using a forin loop is as fast as a simple for loop where the enumerator class is a default implementation.
The compiler now has a new verbose mode which will report which files it is using, making those pesky hard to find “unit x compiled with a different version of unit y” type errors much easier to resolve. It is also able to produce a “bill of materials” file, which lists each source file used by the project, and a hash of the file. This file can optionally be included in the resulting binaries as a resource.
A new profiling api is also included with the compiler, making it simple to produce tools like profilers, code coverage etc, without resorting to parsing map files or writing windows debuggers (the tools would tap into the IDE’s debugger). Expect to see a code coverage plugin giving you code coverage right there in your code editor, running in the background as you type (much like NCrunch for C#).
Linux Support
Linux on Arm, Intel x86 and x64 will be supported, although details are scant on which distros will be supported. Sources tell me that this attempt at Linux support will not be another Kylix, expect to see great things here.
-Library Package Manager
GetIt has been replaced by a new package manager. The package manager is being developed as an open source project, with several high profile community members involved. The project is being managed along the lines of NuGet, borrowing many ideas from it while dealing with the challenges that delphi brings (cross platform, runtime/design time packages). This package manager will be the default way that libraries and components are added to a project. The global Library path is gone (long may it rest in peace!), the project’s Search path is now the only way the compiler will find files. The package manager will install components into the IDE as needed for the project, and unload them when the project is closed. Obviously this makes it more important that component vendors clean up properly when their controls are unload.
Language Changes
The Delphi/Object Pascal language also received a massive investment for this release. Andy was at pains to point out, while a bunch of new language features have been added, they are all very much optional, and your twenty year old code will still compile!
The team spent a lot of time mining the old QC system, Quality Portal, blogs, newsgroups, uservoice, and also studying the advances made in other languages, borrowing the best ideas (just like those other languages did years ago), whilst still maintaining a Pascal style on new language features. Andy declined to comment on slated rooted type system, or whether garbage collection would make an appearance.
One thing that has changed, is that String Indexing on the mobile platforms is now switchable via a compiler switch. This makes it possible to share library code between the desktop and mobile platforms with confidence that a bunch of ‘off by one’ errors won’t crop up. This alone should get a lot of old delphi developers back on side (myself included!).
- Strings in Case Statements
The most requested feature by far, sure to make many long time Delphi fans happy.
case s of
‘hello’ : x := 1;
‘goodbye’ : x := 2;
sWorld : x := 3; //sWorld is a string constant
end;
Case sensitivity is dealt with at compile time via CaseSensitive ‘helper’. The above example is case insensitive, the example below is case sensitive :
case s.CaseSensitive of
‘hello’ : x := 1;
‘goodbye’ : x := 2;
sWorld : x := 3; //sWorld is a string constant
end;
- Try/Except/Finally
The equal most requested language feature, it’s now possible to do
try
…
except
…
finally
…
end;
without resorting to nesting;
- Local Variable Initialisation.
You can now initialise local variables when declaring them, eg :
procedure Dosomething;
var
x : integer = 99;
begin
…
- Inline variable declaration and type inference
You can declare variables inline, and they support type inference :
var x : TStringList := TStringList.Create;
or
var x := TStringList.Create; // it’s a TStringList, no need to declare the type
Inline declared variables have block scope
if test = 0 then
begin
var x := TListString.Create;
…
end;
x.Add(‘bzzzzz’); //Compiler error, x not known here!
- Loop variable inline declaration
You can declare your loop or iteration variable inline, and they have block scope
for var item in collection do
begin
item.x
end;
item.x //<<error item unknown.
for var i : integer := 0 to count do
or
for var i := 0 to count do
- Shortcut property declaration :
public
property AProperty : string; //that’s it, no need for a backing variable or getter/setter
Whilst this might seem the same as declaring a variable, RTTI would be generated differently if it was a variable rather than a property.
- Forward declaration of record types.
type
TRecordB = record;
TRecordA = record
b : TRecordB;
end;
TRecordB = record
a : TRecordA
end;
It’s now possible to write helper classes for interfaces :
TIDatabaseHelper = interface helper for IDatabase
function Fetch : IQuerable;
end;
Also, the limit of one (class or interface) helper per type per unit is now gone.
Delphi’s anonymous method syntax is just too damned verbose… fortunately D11 implements Lambdas. The syntax is identical to C#, so code like this is possible :
var rate := rates.SingleOrDefault(x => x.Currency = currency.Code);
rather than
var
rate : IRate
begin
rate := rates.SingleOrDefault(
function(x : IRate) : boolean
begin
result := x.Currency = currency.Code;
end);
…
(ok, I did sneak in an inline type inferenced local var in the first example!)
LINQ!!!
With Lambdas and multiple type helpers, a LINQ like feature is now possible. Whilst the Delphi Spring library has had Linq like extensions to IEnumerable for a while, D11 now formalises the interfaces and provides an implementation used by the collection classes. Expect to see Linq providers cropping up for databases (ala Linq2FireDAC), xml etc in the future. It’s not clear yet what this feature will be named, legal are still working out the details with their microsoft counterparts, questioning whether an api is copyrightable.
PPL features are being baked into the language, similar to how C# has async & await. This is something that has waiting on the PPL to be fully fleshed out and bedded down. Cancellation Tokens (a notable missing feature in earlier releases) are now part of the library, which also includes inter thread messaging (much like the OmniThread library has, only easier to use).
Non reference counted interfaces, making it possible to use interfaces for abstraction without incurring the compiler generated Addref/Release overhead, not to mention all the reference counting bugs that crop up when a non reference counted object implements an interface.
Operator overloading on classes. This feature should make for some interesting libraries, think DSL scenarios. Care will need to be taken with memory management when using this feature, the online help has good coverage of this topic!
Andy also said that they would be looking at functional languages in the future, with an eye to putting a Pascalish spin on functional programming (again, totally optional language features). A functional language guru from Sydney recently joined the team to work on this (name not provided).
Lastly, work is under way (also for a future release) to make working with JSON much easier, using new dynamic object type. Details are scarce at the moment, but anything that makes working with rest/http services and json in general can only be a good thing (IMHO). This might need ARC or a garbage collector before it becomes a reality.
In Summary
So there you have it, an incredible release. Sadly, just a bit of Friday wishful thinking/pipe dream.
(Disclamer : The author has zero inside information, nothing written above is known to be true, names were made up. Delphi is a trademark of BorIncodembarcadera, Linq is probably trademarked by microsoft - I couldn’t be bothered to check).
PS. Although I have been compiling the above list for a while… nothing has been thought through in any detail. I realise it would take a serious investment to make a reality and is highly unlikely to eventuate.