Skip to content

Tombstones: // removed X, "kept for backward compatibility", comments citing the task ​

Code nobody needs: one of the ways AI coding agents bloat software, from lessloc's pattern catalog. lessloc catches it as history.

What makes tombstones a bad practice? ​

The standard that calls it a bad practice: Clean Code C1 Inappropriate Information.

What does lessloc do about tombstones? ​

lessloc catches it as history.

  • history (tier 3): Dates, change history or notes to the requester in comments.

Examples ​

Caught as history:

python
# Removed the old cache helper
x = 1
# no longer used, kept for backward compatibility
y = 2

Written well:

python
# The cache is per process: workers never share it
x = 1

The other patterns in Code nobody needs:

Released under the Apache-2.0 license. · llms.txt