2 ms·
In Swift I use locally-scoped functions for this. It has the advantage of ensuring that this single-use function can't be called from outside the intended scop
by skohan 7y ago
In Swift I use locally-scoped functions for this. It has the advantage of ensuring that this single-use function can't be called from outside the intended scope, but I can still chunk the work into easy-to-reason-about pieces.
- Nition 7y agoC# has those now also: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/local-functions https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...