component/diff — pull request #1 by coreh (2014-02-01 18:58:49+00:00)
Title: Switch from difflib to Diff Match Patch

`component/diff` will now use the **Diff Match Patch** library, by Neil Fraser from Google.

I initially opted for using **difflib**, as it was smaller and licensed under a less restrictive BSD three-clause license. I'm switching this component over to **Diff Match Patch** for the following reasons:

* The library seems to be more well tested and more robust overall.
* The default output format is way more convenient for a lot of applications.
* The library provides support for exporing and importing delta strings.
* The library provides support for both exact and approximate patching. (So doing `component/patch` will be very simple.)

The two downsides of the switch are really the slight increase in file size and the license change. Apache 2.0 is slightly more restrictive (because of the patent clause) and way more verbose than BSD. Also MIT/BSD seem to be the preferred licenses for components. I talked to @guille though, and he told me Apache is also fine, so here we go.

![](https://lh5.googleusercontent.com/-wYxrQo4Y188/Us3Jj37MJkI/AAAAAAADa00/rWC6K4mONAU/w506-h284/1616.gif)