r/AskComputerScience • u/PsychologicalTap4789 • Sep 03 '25
Languages/Environments that spot duplicate functions
Is there either a language or environment that can tell you if a function you've made matches a function that already exists in a library (except for maybe name?)
2
Upvotes
2
u/custard130 Sep 03 '25
flip a coin
if it lands on heads then there is a library
if it lands on tails there are many libraries including some that are properly maintained
if it lands on its edge then the system failed to find a library but cant guarantee that one doesnt exist
2
u/ameriCANCERvative Sep 07 '25
I mean jetbrains products keep an eye out for duplicate code and throw warnings when they find them. Anything more than that, like actually analyzing the code, and it gets very complex, too complex to justify.
1
u/Pale_Height_1251 Sep 06 '25
Realistically, for work of any complexity, it's going to be a crapshoot.
4
u/[deleted] Sep 03 '25
[removed] — view removed comment