On Jan 24, 2025 at 11:20:02 AM, Nikolay Nikolov via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote:
> As you can see, it's more complicated and more error prone. You can > simplify it a little bit with goto, but it will never be better, compared > to try...finally > > ok, I’ve never used exceptions in FPC except to mean actual exceptions as in the program is corrupted so quit and exit. I’ve seen other people put these all over their code though. I guess the idea is that they’re trying to recover from exceptions and so they need to wrap literally every single function that could fail anywhere with try…finally. I don’t have any examples but I think I’ve seen this (feel free to post any if people could think of some from real projects). Feels to me like manual memory management and exceptions don’t mix well. I use exceptions in C# and Swift and they don’t require all this boiler plate to prevent memory leaks. Regards, Ryan Joseph
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal