Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
seanalltogether
on June 4, 2014
|
parent
|
context
|
favorite
| on:
Show HN: 2048 in Swift
case let .DoubleCombine(s, _, _): return s
Is the underscore a special character in this case to tell the compiler not to read in the value of those arguments? Or is it actually loading in "second" and then "value" into an argument named _?
weego
on June 4, 2014
[–]
Assuming it's the same as other pattern matching langs it is a wildcard that signals the intent that you don't care about what value those would be.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: