G-7410: Avoid standalone functions – put your functions in packages.

Minor

Maintainability

Reason

Use packages to structure your code, combine procedures and functions which belong together.

Package bodies may be changed and compiled without invalidating other packages. This is major advantage compared to standalone procedures and functions.

Example (bad)

CREATE OR REPLACE FUNCTION my_function RETURN VARCHAR2 IS
BEGIN
   RETURN NULL;
END my_function;
/

Example (good)

CREATE OR REPLACE PACKAGE BODY my_package IS
   FUNCTION my_function RETURN VARCHAR2 IS
   BEGIN
      RETURN NULL;
   END my_function;
END my_package;
/