Shorthand notation for named arguments


#1

How about something like this?

fun foo(first: Int, second: Int, third: Int, fourth: Int) {
    // ...
}

fun bar(second: Int, third: Int, fourth: Int) {
    foo(first=10, second=second, third=third, fourth=fourth)
    // Better: foo(first=10, =second, =third, =fourth)
}

fun baz() {
    var first = 10; var second = 20; var third = 30; var fourth = 40
    if (something) {
        first += 1
        third += 2
    } else {
        second += 3
        fourth += 4
    }

    foo(first=first, second=second, third=third, fourth=fourth)
    // Better: foo(=first, =second, =third, =fourth)
}