-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
From my understanding, using “{}” to create a dictionary means if inherits the properties of the Object prototype, whereas using Object.create with a null parameter does not inherit any of the properties. I looked up some more stuff about it and learned that maps created this way have faster access times in some cases. Interesting. https://stackoverflow.com/questions/34480709/why-is-object-create-so-much-slower-than-a-constructor By the way, cool work! |
There are two places where These days of course this level of backwards compatibility is completely ludicrous. |
I just went on paternity leave for the last few months, I'm jumping back into this now. 😄 |
Looked at the git diff since I last touched this, seems I can safely rebase and go forward as the changes were to a header file and the dart code. |
@rgbkrk Typescript doesn't do anything special here. |
Ah I think I understand the source of confusion here. The JS built file in Neil's zip is outdated. Tr building it and you should get the same result. |
Also I worked on a conversion not realizing this PR existed, if you'd like to take a look, I'd love to hear your thoughts on: #74 One design decision I want to point out is making Diff a class with text and operation properties. On the one hand that's more consistent with other language conversions and is cleaner to define and access than using a Tuple (Array), but I'm wondering if that's worth it if it makes migration more tedious. |
@samelhusseini hey no problem, I've ended up being swamped with other work so I'm glad you've picked this up. |
Closing in favor of #74 |
Following on from #58, I've kicked off the conversion of
diff-match-patch
starting with @NeilFraser's starting point as the first commit. I've included the built copy for now, though I may strip that out and rebase it based on feedback.One interesting thing between Neil's built version and my built version:
Not quite sure why typescript goes that route to make an object with a null prototype (that still behaves like an object).
What works
diff_match_patch_uncompressed.js
which is not generated (by name) hereNext steps
@types/diff-match-patch
to ease migration