Trailing whitespaces bring no information, they may generate noise when comparing different versions of the same file, and they can create bugs
when they appear after a \
marking a line continuation. They should be systematically removed.
An automated code formatter allows to completely avoid this family of issues and should be used wherever possible.
DECLARE
-- The following line has many trailing whitespaces
foo VARCHAR2(42) := 'a
b';
BEGIN
-- Will misleadingly show 3, counting only the characters 'a', 'b', and the line terminator, but none of the trailing whitespaces
DBMS_OUTPUT.PUT_LINE(LENGTH(foo));
END;
/