D7716: rust-discovery: partial switch to typestate pattern

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Dec 27 17:38:31 EST 2019

martinvonz added a comment.

  In D7716#114043 <https://phab.mercurial-scm.org/D7716#114043>, @gracinet wrote:
  > @martinvonz yes, I've thinked of it after I made this one, but somehow I thought this was enough for a first try.
  It seems like it would be a lot of churn to take this patch and then a follow-up that rewrites it. I'd be much happier to take a patch that cleaner version right away (and it sounds like we both think it would be cleaner).
  > Yes, we could have `PartialDiscovery<Start>`,  and `PartialDiscovery<Computed>`, with  `Start` being a pure marker,  and `Computed` actually holding the undecided set and the children cache (anticipating on a later changeset), that would be more elegant and it would better organize the boiler plate.
  > Don't hesitate if you come up with better namings.
  I haven't even reviewed in enough detail to know what the states represent, so I don't have any suggestions yet :)

  rHG Mercurial



To: gracinet, #hg-reviewers, martinvonz
Cc: martinvonz, Alphare, durin42, kevincox, mercurial-devel

More information about the Mercurial-devel mailing list