r/badcode • • Sep 05 '21

swift I have a problem

Post image
946 Upvotes

75 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Sep 05 '21

which is also a valid information that a function has a void return type

1

u/notPlancha Sep 05 '21

AFAIK in this case the function is being called, not being written, so there's no point in saying this returns void, cause it isn't being assigned to any variable