Closed awfm9 closed 3 years ago
My opinion on this is that we should name parameters and return values according to the same principle, which is:
// DON'T type Something interface { LoadBlock(blockID flow.Identifier) (block *flow.Block, err error) } // DO type Something interface { LoadBlock(flow.Identifier) (*flow.Block, error) }
// DON'T type Something interface { LoadBlock(uint64) (flow.Identifier, flow.Identifier, error) } // DO type Something interface { LoadBlock(height uint64) (blockID flow.Identifier, parentID flow.Identifier, err error) }
Within an interface, we can use both approaches, depending on what makes sense.
My opinion on this is that we should name parameters and return values according to the same principle, which is:
Within an interface, we can use both approaches, depending on what makes sense.