The more Delphi is being used, the more you'll find that it is an inconsistent and illogical language.

Over the years, Delphi has started becoming an inconsistent and illogical language, the more I use it.

For example, Exit(value) is supposed to be a shorthand for "Result := value; Exit" right?
But it's not, when used in the example program below:

program ExitBug;
{$APPTYPE CONSOLE}

{$R *.res}

uses
  System.SysUtils, System.Classes;

{$DEFINE BUG} // Comment out this line to see it working

type

  TMyClass = class
  protected
    type
      TVersionReadHandlerProc = function (const AStream: TStream; const Data): Boolean of object;
      TVersionWriteHandlerProc = function (const AStream: TStream): Boolean of object;
    function DefaultReadHandler(const AStream: TStream; const Data): Boolean;
    function DefaultWriteHandler(const AStream: TStream): Boolean;
  public
    function LookupReadHandler: TVersionReadHandlerProc;
    function LookupWriteHandler: TVersionWriteHandlerProc;
  end;

{ TMyClass }

function TMyClass.DefaultReadHandler(const AStream: TStream;
  const Data): Boolean;
begin
  Result := False;
end;

function TMyClass.DefaultWriteHandler(const AStream: TStream): Boolean;
begin
  Result := False;
end;

function TMyClass.LookupReadHandler: TVersionReadHandlerProc;
begin
  {$IF DEFINED(BUG)}
  Exit(DefaultReadHandler); // E2035 Not enough actual parameters at line 41 (41:26)
  {$ELSE}
  Result := DefaultReadHandler;
  {$ENDIF}
end;

function TMyClass.LookupWriteHandler: TVersionWriteHandlerProc;
begin
  {$IF DEFINED(BUG)}
  Exit(DefaultWriteHandler); // E2035 Not enough actual parameters at line 50 (50:27)
  {$ELSE}
  Result := DefaultWriteHandler;
  {$ENDIF}
end;

begin
end.

In the code above, you'll see that you cannot call "Exit(DefaultWriteHandler)" when BUG is defined. It is supposed to be equivalent to "Result := DefaultWriteHandler; Exit", but for some inexplicable reason, the compiler does not accept it.

If you use it somewhere in the middle of a block of code, "Exit(DefaultWriteHandler)" is supposed to be equivalent to "Result := DefaultWriteHandler; Exit", but with this compiler bug, you can't write "Exit(DefaultWriteHandler)", you have to write "Result := DefaultWriteHandler; Exit"
In my example above, because it's the last in the block of code, "Exit" is left out after "Result := ...;"

Next, here's an illogical and inconsistent Delphi design.

var x := 0.0;

In Win32, x is inferred and predicted to be Extended, and it is so. However, in Win64, x is inferred to be Currency, however, it is expected and predicted to have the same type as Win32, which is Double (because Extended is Double on Win64). However, it is not.
Currency and Extended has different precision, and so, the behaviour is different than expected.

So, in order to write Delphi code that works and behaves as expected, it is suggested, due to reasons such as above, that one uses "Result := ...; Exit;", instead of "Exit(...);", and to explicitly specify types of variables, rather than let the compiler infer the types.