Local Functions and Readable code

So one of the aspects of local functions that I love is that it allows you to further scope code-units.

With that said, I find local functions to be eye-sores. When reading code, top-to-bottom, I just know that I’d prefer if the implementation of the functions were not within the function from a readability standpoint.

From research, I’ve found that people either love local functions, or hate them. I’m curious if there is anything you could do that would make local functions more readable. I’ve considered creating regions within functions that might make it easier to parse procedural code from function declaration.

submitted by /u/EngineerEll
[link] [comments]

Leave a Reply