|
|
|
|
|
by oselhn
3421 days ago
|
|
RAII is not superior both ways have their own drawbacks. You can forget to write finally and it may produce duplicated code. On the other hand RAII requires you to create new type just for exception safety (scope guard - which you may also forget to use). I prefer RAII but there are situations where finally leads to more readable code. |
|