Re:Java Was Strongly Influenced by Objective-C
by mikeash on Wednesday December 26, 2012 @09:10PM
(#4971994)
Just make sure you prefix your category methods. Somebody at Apple might have the same idea you have, and if the two implementations aren't perfectly compatible, you're in a world of hurt.
[ Parent
| on HN ]
Re:Java Was Strongly Influenced by Objective-C
by MaxGabriel on Thursday December 27, 2012 @12:05AM
(#4972406)
I wouldn't know how much the convention is enforced, but doesn't Apple prefix private API with an underscore?
Edit: this is from the Apple naming guidelines, but it doesn't clarify that they always follow that convention for private methods: Avoid the use of the underscore character as a prefix meaning private in method names (using an underscore character as a prefix for an instance variable name is allowed). Apple reserves the use of this convention. Use by third parties could result in name-space collisions; they might unwittingly override an existing private method with one of their own, with disastrous consequences. See “Private Methods” for suggestions on conventions to follow for private API.
Re:Java Was Strongly Influenced by Objective-C
by hboon on Thursday December 27, 2012 @05:06AM
(#4972927)
They most definitely have private functions that do not have prefix. The iOS Three20 framework used to have a bug where you tap on a tab bar button a second time and it crashed because a cateogry method had the same name as an existing private method.