The latest version of Delphi is now shipping, and is an exciting release. A full list of changes and new features would be far too much for this post, but I will be posting about particular items of interest.
Ternary Operator
For years, many users have expressed the desire for Delphi to support a ternary operator, and that has been added in the new release:
// classic if statement
if Left < 100 then
X := 22
else
X := 45;
// assignment with if operator
X := if Left < 100 then 22 else 45;
Code language: JavaScript (javascript)
This is not unlike the IfThen function which has been available for years, but the new syntax can be used as part of any expression, as here:
ShowMessage (if Left < 100 then 'Small' else 'Big')
Code language: JavaScript (javascript)
There is more detail available in a blog from Marco Cantu.
TitleBar Styling
In another blog, Marco Cantu presents the new TitleBar styling in the VCL.
The TitleBar component has been around for a few releases now, but the new customization features continue the modernization of UII components and allow for a more coherent visual style.
Support has been added for drawing styled controls in the TitleBar, and includes support for using VCL Styles colors, so these features will update when a new style is applied.
Feature Matrix
A detailed feature matrix is available.
So Much More…
There is much to explore and much to enjoy. More to come…