Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
kennywinker
on June 3, 2019
|
parent
|
context
|
favorite
| on:
SwiftUI
That’d be standard swift type inference. The .color function takes a single unnammed parameter of type Color (or similar, idk exactly). Color.gray is a static constant value. So .color(Color.gray) can be simplified to .color(.gray)
steve_adams_86
on June 3, 2019
[–]
Huh, that's actually a great way to do type inference. Swift seems like an excellent language.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: