Open rigelrozanski opened 6 years ago
Could maybe be placed in go/
dir but this repo needs to be reorganized heavily anyways
I think this will only be beneficial if there is some documentation on what the design pattern means. (At least a link of a blog post of some developer somewhere.)
For example: Use contexts where possible: https://blog.golang.org/context Use pointer method receivers where possible: https://nathanleclaire.com/blog/2014/08/09/dont-get-bitten-by-pointer-vs-non-pointer-method-receivers-in-golang/
etc... (I know that the examples are very basic.)
We should create a design patterns document for standardized design patterns and associated language which are used within Tendermint/Cosmos. Off the bat, a few features which I think should be discussed here include:
Ensure
to express conditional update functions (a function which may update something depending on a condition) - ref https://github.com/cosmos/cosmos-sdk/pull/1858#discussion_r208316437