Content pfp
Content
@
0 reply
0 recast
2 reactions

Paul Berg pfp
Paul Berg
@prberg
Random Solidity tip. Starting V0.8.22, it is no longer necessary to use the ugly "unchecked { ++i; }" syntax in for loops. The compiler will apply unchecked arithmetic by default.
4 replies
6 recasts
84 reactions

EOF pfp
EOF
@eof
uint256 is redundant here though.
1 reply
0 recast
0 reaction

Paul Berg pfp
Paul Berg
@prberg
I don't find "uint256" redundant, ever. It's cleaner than having to guess the bit width.
1 reply
0 recast
0 reaction

EOF pfp
EOF
@eof
Not guessing = boring. If picking wrong width, at least one auditor will become a bit (depends on mistake delta) happier. Better than any caffeine innit.
1 reply
0 recast
1 reaction

nx pfp
nx
@nxs
following that logic, let’s write the worst possible code filled with as many mistakes as we can so the auditor reviewing it overdoses on happiness 😄
0 reply
0 recast
1 reaction