What difference does it make if I assign the value of a storage variable in the same line where it is declared vs if I assign its value in the constructor? Which would be the preferred approach? And if both would have the same exact effect, which would be the most gas-efficient implementation?
Example:
contract Demo {
uint256 public a = 10_000_000;
constructor() {}
}
vs
contract Demo {
uint256 public a;
constructor() {
a = 10_000_000;
}
}