azriel91/peace

Type Parameter Revamp / Simplification

azriel91 opened this issue · 0 comments

Related to #161, we should consider simplifying the type parameters in CmdCtx, CmdCtxBuilder, Flow, etcetera.

Candidates for simplification:

  • number
  • naming / splitting, e.g. AppError vs FrameworkError
  • bounds

Candidates

  1. An exploratory method for simplification is use one type parameter, with multiple associated types, and each associated type has different bounds.
  2. We might not want O as a type parameter, and instead hold a Box<dyn OutputWrite> that delegates to a list of OutputWrites for writing output to screen and logging.