mapping(address => uint) private _balances;
function balance() public view returns (uint) {
return _balances[msg.sender];
}
My question is. Should you/Why/When should you use private _balances, versus just using public and not having to write a getter for the function
mapping(address => uint) public balances;
What's the main difference?