In my opinion the example given is awful code, yes we should protect developers from themselves but good taste in code is important and incrementing a counter easily should still be a thing. Just stop the bad cases then rather than the well understood and expected usage.