Comment

Comment by kodfodrasz

Could someone tell me the meaning of _ in this Swift code:

    func greet(_ name: String,_ day: String) -> String {
        return "Hello \(name), today is \(day)."
    }
    greet("Bob", "Tuesday")
In me prior experience usually _ denoted an unused parameter/variable.

Also: I find the string interpolation syntax ugly... The syntax choices in Swift are curious, but not the most aesthetical/practical in my opinion.

parent kodfodrasz 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton