4 ms·
...and a we would get a host of new bugs that would be a lot harder to fix. Invisible jumps are very bad.
by quelsolaar 2y ago
...and a we would get a host of new bugs that would be a lot harder to fix. Invisible jumps are very bad.
- bangaladore 2y agoNearly every modern language supports defer in some sense. Unless you are talking about RAII hiding the defer, but that's not the case with a custom Defer type or similar that takes a closure in the constructor. Defer is a way better solution than having to cleanup in every single failure case.
- jefbyokyie 2y ago> cleanup in every single failure case you're only tempted to clean up [fully] in every single failure case if you don't know how to implement cascading gotos or the arrow pattern.
- bangaladore 2y agoI'll be honest that you are in the minority here. goto is widely considered an anti-pattern and so is the arrow pattern.
- jefbyokyie 2y ago> you are in the minority here Yes, I am.
- jefbyokyie 2y ago> Invisible jumps are very bad Agreed; they're terrible. Implicit sucks, explicit rules.