Simple Dynamic Strings library for C
The biggest missing thing in C imho is destructors, because you need to manually clean up everything whenever you leave a scope or function. That means calling "free" at every exit point.Or alternatively, putting one "cleanup:" label at the end of the function and using "goto cleanup;" instead of break or return everywhere.But goto is considered harmful, so that handy pattern seems unclean.My question is: do you consider the "goto cleanup" pattern clean or not, and if not, what are better alternatives?