3 ms·
I think it’s important to reflect on old practices and consider why they were important, and whether they still are. Many of the reasons for only having a sing
by aardvark179 5y ago
I think it’s important to reflect on old practices and consider why they were important, and whether they still are.
Many of the reasons for only having a single return were that it made it much easier to reliably clean up resources allocated by the function. Given a language with garbage collection, or even simply try, catch, and finally, provide a better way to handle this. The mistake Javascropt makes is allowing a return in a finally block.