I would go so far as to say the RAII pattern exists to emulate defer in languages that lack it. There is no need for RAII in Swift because Swift has defer.
2 Likes
I would go so far as to say the RAII pattern exists to emulate defer in languages that lack it. There is no need for RAII in Swift because Swift has defer.