3 ms·
>in C every copy, every destructor, every alloc, is explicitly declared everywhere. Explicit is much safer than implicit Unless a programmer forgets to call a
by protomolecule 2y ago
>in C every copy, every destructor, every alloc, is explicitly declared everywhere. Explicit is much safer than implicit
Unless a programmer forgets to call a 'destructor' on some code path in C's explicit error handling maze.
- d110af5ccf 2y agoAgreed. Explicit is only better than implicit when you have a mechanism that can reliably identify instances where you forgot to do something. Actually for resource management I'd go so far as to say that implicit is better than explicit in the vast majority of cases. Now if only the rules that determine what happens during initialization in C++ weren't so horribly convoluted.