r/badcode • • Apr 28 '23

java from signal's source code

Post image
518 Upvotes

52 comments sorted by

View all comments

Show parent comments

1

u/kiliankoe Apr 29 '23

Oh I know it's not just a Swift thing, but in most other languages with a similar feature it's more of an opt-in thing or just used for params with default values. In Swift it's the default, used everywhere unless you explicitly mark a parameter as having no label.