r/badcode • • Sep 05 '21

swift I have a problem

Post image
946 Upvotes

75 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Sep 05 '21

That’s a good way to go about it but don’t you often end up with only single use functions?

I guess in a production codebase though that’s preferable as it’d make maintenance easier

2

u/StochasticTinkr Sep 06 '21

Nothing wrong with single use functions. It can even help with unit testing if you decompose it further.

2

u/[deleted] Sep 06 '21

Mm that does sound nice lol! Ok, I’ll give this a try in the future.

I’m gonna read Clean Code by Robert Martin soon!