It happens when a certain function within a module needs to call ๐ functions from other modules too often to complete its functionality. This often happens when functions are spread across ๐ multiple modules, indicating that the code has low ๐ cohesion.
Why is it bad?
Low cohesion leads to high coupling โก between modules, which makes the code considerably harder to maintain ๐ซ over the long run. Low cohesion also indicates that the responsibilities of the modules are not well defined ๐๐ and respected.
It may be easy to forget ๐ต to call a certain method or to call methods in the incorrect order, leading to many hard-to-find and fix bugs ๐ชฒ.
How to fix it?
Move ๐ฑ๏ธ the function that is continuously interacting with another module to that module. More generally, consider improving the design of the system โ๏ธ by better setting the boundaries ๐ between the domains.
"Put things together that change together".
Details๐https://refactoring.guru/smells/feature-envy