This repository is dedicated to my (Mark Ipatov) project, which was done as a bachelor thesis, regarding the benefits, use, and implementation details of two features: Enforced Named Argument Form and Argument Labels.
As these features are interconnected, the introduction file presents basic descriptions and general reasons for implementing them.
More specific information regarding the features, discussions and existing prototypes is placed in their corresponding directories:
Some additional findings not directly related to either of the features are gathered in the corresponding document.
There were many sources for discussions, ideas, and code snippets; they are collected here to preserve them for further discussion.
- Discussion about internal and external names
- Another discussion on the internal parameter names
- Issue KT-34895 (Internal and External names) on the Kotlin youtrack, one of the starting points
- Issue KT-59531 (Non-stable parameter names of interface functions), regarding the overrides with different names
- Stackoverflow discussion on unnamed function arguments
- Issue KT-9872 (disallow calling a method with named argument), to allow overrides with different names without problems
- Issue KT-8112 (provide syntax for nameless parameters), to suppress warning and IDE quickfix
- Issue KTIJ-10594 ("Parameter is never used" quickfix), how this quickfix can render the code invalid
- Issue KT-14934 (Enforce parameter usage only in named form), one of the starting points
- Issue KTIJ-1634 (Add inspection for boolean literals passed without named parameters), about an inspection which motivation is close to one for the enforced named form feature
- Issue KTIJ-18880 (Consider more sophisticated inspection...), same as the previous one, but not only for Booleans
- Small topic on enforcing of named arguments
- Stackoverflow discussion on vararg Nothing for enforcing named form
- Issue KT-12846 (Allow vararg parameters of type Nothing), directly related to the previous discussion
- Swift documentation on functions, argument labels and their enforced named form
- Discussion on Swift forums about when to use argument labels and the named form itself