refactor(AztecNr): Unify isEmpty
/isZero
and empty
/zero
API and Empty
trait
#4638
Labels
C-aztec.nr
Component: Aztec smart contract framework
We don't have consistent naming of functions which return an instance of an "empty"/"zero" object and the related functions (isEmpty etc.).
We diverged in a few places from
empty
because it became unclear. One of these cases was when we I changed the naming ofAppendOnlyTreeSnapshot::empty
to::zero
because there it was not clear whether it's a snapshot of a tree where all the nodes are zero or whether it represents a tree where the leaves are 0 but all the other levels are hashed.I would use "zero" in cases where all the values are set to 0/are "falsey" and empty in the rest of the cases.
The text was updated successfully, but these errors were encountered: