Live data from Hacker News

CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

developer.apple.com

81–90 of 188 posts

Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

#81

Anybody care to introduce me to this? Why does it have to be father's sister but mother's sibling? And how does elder and younger cousins behave differently?

I am pretty sure it is because in some languages (such as Arabic), there are specific, different words for relatives in those different cases. Someone more knowledgable than I can probably confirm.

Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

#83

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_...

Here's the likely explanation for these: https://en.wikipedia.org/wiki/Chinese_kinship#Common_extende...

Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

#84
post #60

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_...

You need an intermediate representation (like a tree) rather than attempt to brute force every possible permutation up until some arbitrary point. Even if that weren't the case, it'd be better to give it a more obscure name or create some kind of naming system and then document it rather than demonstrate why self-documenting code can become self-defeating if taken to an extreme.

Not sure, but I sort of expected this monstrosity happens because the labels are intended to be localizable.

Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

#85
post #9

Earlier quoted context omitted.

HN should add the CSS rule "word-wrap:break-word". In fact this rule should almost always be the default for text that might contain excessively long words (such as user-submitted text on forums).

(...Or german)

You should use ­ or between word­parts for 100% pedantically correct word breaking.

Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

#86
post #82
post #6

表姐, in case you were wondering.

Younger Cousin should be 表妹. Was the title edited?

Sadly yes, because "younger" is longer than "older": https://news.ycombinator.com/item?id=20352001

Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

#87
post #26
post #6

表姐, in case you were wondering.

The "CN" is just the prefix for the Contacts framework, it doesn't refer to Chinese

It's still a specific relationship in chinese kinship, which is likely why it was included as apparently CNf statically encodes all possible relationships.

Re: CNLabelContactRelation​YoungerCousin​MothersSiblingsDaughter​OrFathersSistersDaughter

#90
post #65

Earlier quoted context omitted.

In Chinese culture, your male line ancestry matter more. Your mother's family is considered auxiliary ('外家'), thus only your father's brother's children are considered in the same family, and these cousins are labeled “堂”, all the other cousins are labeled "表”, and "姐" means older sister.

Is this why it is a mother's sibling of any gender, but only a father's sister?

That's my understanding, a difference is made between paternal lineages (through the father's brothers) and maternal (either father's sister or any sibling of the mother).

Possibly denoting similar v different family names?

Post reply on HN