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

that's shortcut syntax for an enumeration case where the type of the enumeration can be inferred


It's not just for enums. It works for any static variable on a given type. So you can say .gray and have it map to NSColor.gray, etc.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: