Consider alternative code pattern? #23
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consider both
Validator
andProcess
: at current, we have a struct operating on an enum, using functions that develop in relation to the data that struct owns. My sense is that this simplifies lifetimes. It's effectively the Visitor pattern or Fold pattern, but without the abstract trait—since we don't have more than one or two visitor/folders for any given data structure.But there's an alternative argument to be made that the nodes themselves ought to have the behaviour attached to them. So instead of a visitor pattern, any function that has to span all the branches of an enum should be defined as an
impl
on that type.Maybe. Think about this.