Learning about the latest enhancements
The classic Pascal language rules have been followed in Delphi very closely—and that's a good thing, in my opinion. I remember stumbling through BASIC or JavaScript many times looking for the source of an error only to discover that a slight typo changed the name of a variable deep in a subroutine and subsequently lost the value I had been expecting. In Delphi, a mistake like that wouldn't even compile because identifiers have to be declared in a var
or const
section at the top of a method, or in a separate section of the class or unit. Some have decried this as old-fashioned and inconvenient, but with some IDE keyboard shortcuts and quick-setting bookmarks, any arguments for productivity loss have been removed.
Simplifying variable declaration
With Delphi 10.3 Rio, the declaration of local variables has been given a flexibility boost. You still have to declare them, but they no longer have to be declared in a separate var...