|
|
|
|
|
by ncruces
265 days ago
|
|
There's no way to write a "destructor" defensively, if the contents of memory it is trying to "destroy" are undefined. Whereas it's perfectly possible to only defer a statement when you know the "object" has been properly initialized. That's why defer makes sense in a language like C (even Go), but RAII does not. |
|