Is there any chance Kotlin could "synthetize" name...
# stdlib
p
Is there any chance Kotlin could "synthetize" named arguments for Java libraries? Some libraries I use take many arguments of the same type so order matters. It would be great if I could explicitly name the arguments.
j
This has nothing to do with the standard library. It would be a compiler feature. And Java already has a mechanism to include parameter names in the classfile so it would be whether or not those are considered actual public API that can be relied on.
e
Are the libraries public? Can you name them?
p
@elizarov I ran into this in the case of jOOQ. It generates "record" classes that take in many named parameters. Their order depends on the order of the source database table columns. Mind you, jOOQ now actually supports generating Kotlin record classes but it makes all fields nullable (even those that are not null in database) which makes them hard to work with compared to the Java version.
e
Is this nullability done by design or is it just an omission? In the later case you can file an issue.