Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can name parameters externally and externally explicitly.

    func sayHi(to personName: String) {
        print("Hi \(personName)")
    }
    sayHi(to: "Bob") // Hi Bob 
Similarly, using just one label in the function declaration means that they have the same name externally as well as internally.

In this case the example is saying that they don't want any external labels.

edit: damnit, beaten



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: