G-7440: Never use OUT parameters to return values from a function.

Major

Reusability

Reason

A function should return all its data through the RETURN clause. Having an OUT parameter prohibits usage of a function within SQL statements.

Example (bad)

CREATE OR REPLACE PACKAGE BODY my_package IS
   FUNCTION my_function (out_date OUT DATE) RETURN BOOLEAN IS
   BEGIN
      out_date := SYSDATE;
      RETURN TRUE;
   END my_function;
END my_package;
/

Example (good)

CREATE OR REPLACE PACKAGE BODY my_package IS
   FUNCTION my_function RETURN DATE IS
   BEGIN
      RETURN SYSDATE;
   END my_function;
END my_package;
/