At first glance this looked like a code smell, but after some reflection I can't think of a cleaner, more readable way to uniquely identify each possible relationship -- especially in a strongly-typed language with an IDE. Here's the full list: https://developer.apple.com/documentation/contacts/contacts_...
`Colleague` in `CNLabelContactRelationColleauge` is spelled incorrectly.
CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
111–120 of 188 posts
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#112Earlier quoted context omitted.
Yup. @dang, can you fix this?
In principle yes, but I tried in 4 (edit: 5) browsers and couldn't reproduce the problem, and it's late here and I'm running out of steam. So you may have to suffer overnight. Sorry about that. Edit: ok, thanks to https://en.wikipedia.org/wiki/Unicode_character_property#Whi... I put in a bunch of ​ . I hope that fixes it because I need to sign off now. If it isn't fixed, it would be helpful if som…
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#113At first glance this looked like a code smell, but after some reflection I can't think of a cleaner, more readable way to uniquely identify each possible relationship -- especially in a strongly-typed language with an IDE. Here's the full list: https://developer.apple.com/documentation/contacts/contacts_...
enum CNLabelContactRelation {
static let aunt = "…"
static let auntFathersBrothersWife = "…"
}Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#114That label is so long it’s breaking the HN front page layout for me on mobile.
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#115Earlier quoted context omitted.
Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz 1: https://de.m.wikipedia.org/wiki/Rindfleischetikettierungs%C3... - check out the voice version!
You've got to love the "abbreviations" for these laws. RflEttÜAÜG
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#116表姐, in case you were wondering.
Exactly... Could it not just have been named CNContactLabelRelation表姐 ?
I think it makes more sense to keep all identifiers in English or alternatively provide completely localized versions of the API in other languages, going halfway is just going to confuse everybody. Remember for instance the confusion created by PHP using hebrew in the symbol for the '::' operator: https://stackoverflow.com/questions/592322/php-expects-t-paa...
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#117Earlier quoted context omitted.
Is Chinese the only language with this relationship? Also, identifiers in Apple frameworks are always ASCII.
They could have used Pinyin. Even people who don’t speak Chinese and have to look it up would have an easier time understanding it than trying to parse this identifier.
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#118Earlier quoted context omitted.
`Colleague` in `CNLabelContactRelationColleauge` is spelled incorrectly.
If you have a macOS or iOS beta installed, please report that through the Feedback app on either?
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#119Needs CNFathersMothersNephewsCousinsFormerRoommate
Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter
#120I can see why this is needed. English has very broad words for relatives like "grandfather" or "aunt". Most languages have more specific words, especially Chinese where there are separate words for fathers or mothers side, older or younger and sibling or siblings spouse. You also often use these relation words rather than their names when referring to a relatives. If this code was in Chinese, they would all be short…
(Most of my learning is via Duolingo, so I'm no expert, just curious.)