Hacker News new | ask | show | jobs
by rossmohax 1603 days ago
I wonder why they introduced new diff mode, rather than making diff3 better.
2 comments

It's semantically slightly different. In the case of diff3 if you remove everything but the base part, then you get exactly the base version, while in the case of zdiff3 you also get the prefix and suffix parts from the two branches that merge cleanly.

I guess the difference is subtle, especially that there can be other merges within the same file that merge cleanly in both cases.

Some people are used it, prefer it and probably it would break some automated tests people have too.
who cares?

I hate this approach because this is very lazy (you avoid thinking about hard stuff and pick easy solution) and is very short term

sure you can introduce 150 configuration modes

but it makes your thing messy, confusing for new people, confusing for inexperienced and requires more maintenance

it's like taking tech debt

> who cares?

Loads of people who have to maintain things.

This is a standard approach to software development: you introduce a new alternative for something that exists, then mark the existing inferior option as "deprecated". This gives developers a chance to learn about the new feature and move over to it by the time it actually gets removed in a future version. Cutting it immediately would cause a huge amount of frustration since the users of the feature would demand to know where it went or why it suddenly no longer works while the maintainers would have to scramble to find a solution. It would turn people off from using that software in the future.
The thing is that

>by the time it actually gets removed in a future version.

doesn't always happen, so we're left with new, new v2, new v3 options and old one still exists "because it may break somebody's workflow"

I would argue that for most cases, that's preferable to simply cutting old functionality. The only exception would be in environments where the upgrade process is more rigid where users/admins know what's changing with an upgrade and have a safe and easy way to roll back in case of any issues.