Re:Objective-C isn't what you think it is
by bennyg on Wednesday February 26, 2014 @03:55PM
(#7307717)
How would you refactor a third party library delivered as a binary in a language with namespaces?
[ Parent
| on HN ]
Re:Objective-C isn't what you think it is
by klibertp on Wednesday February 26, 2014 @06:57PM
(#7309222)
By importing names from that namespace and aliasing them. Or by creating another namespace and importing them there.
You can't seriously argue that "NSArray" as a single string is the same thing as (hypothetical) "NS.Array", where both "NS" and "Array" and the thing at "NS.Array" are semantically different things. Don't get me wrong, I love Smalltalk and Erlang - both languages suffering from the same problem - but I can recognize a shortcoming when it bites my arm off.
Re:Objective-C isn't what you think it is
by bennyg on Wednesday February 26, 2014 @07:47PM
(#7309469)
I was genuinely asking in my question above. I'm all for it as long as it makes sense. I've never messed with aliasing or anything like that - I'm decently fluent in Objective-C but have only really dabbled in ruby/js.
After looking around halfway through writing this, this looks pretty nice:
http://stackoverflow.com/questions/11091740/is-it-possible-t...
I see what you're saying. Maybe it's Stockholm Syndrome, but I do like knowing associated files in 3rd party libraries easily too. I don't know, I'll experiment with this more in ruby and see how it feels.