Feature Request: by Argument

Suppose that you have a class with a constructor like:

class LargeClass(
    dep1Lazy: Lazy<Dependency1>,
    dep2Lazy: Lazy<Dependency2>,
    dep3Lazy: Lazy<Dependency3>,
    ...
) {

that had many Lazy arguments, which you then delegate to for convenience within the class:

    private val dep1 by dep1Lazy
    private val dep2 by dep2Lazy
    private val dep3 by dep3Lazy
    ...

There are now two lines required for each Lazy argument, so it almost feels like we’re writing Java again.

Could we instead write this in a much more compact form:

class LargeClass(
    private val dep1 by Lazy<Dependency1>,
    private val dep2 by Lazy<Dependency2>,
    private val dep3 by Lazy<Dependency3>,
    ...
)

The above would compile as if written in the first way. This would cut down on the number of lines of code required and the bothersome intermediate names like dep1Lazy.