this post was submitted on 22 Jun 2023
41 points (87.3% liked)
Programmer Humor
32562 readers
405 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
That's intentional. So if one part of the code suffers a random mutation and spontaneously develops a bug, the redundant code can still ensure the proper functioning of the program while the bug gets fixed.
Just take care if you merge two branches that contain the same bug; you might end up with a program without functional redundant code. That's why you should never merge closely related branches.
It's how ~~isoforms~~ functions with different signatures evolve. As long as it isn't harmful it tends to stick around. Then the different code may develop adaptations which fit it into a niche if it is a selective advantage for the ~~organism~~ code base.