> Objective-C isn't what you think it is A language without namespaces, that's used almost exclusively for iOS apps and nothing else. Nope, that's exactly what I think it is.
Yep. And the fact that Apple did absolutely nothing to evolve the language into something better shows that they just don't give a fuck about tools and most importantly about their developers! Maybe it's better than C++ or other alternative, maybe XCode is quite good, but this just show that since the days of NeXT (the 80s!), they just don't give a fuck! ...hate to say it, but nowadays the only big company that seems…
Objective-C isn't what you think it is
61–70 of 101 posts
Re: Objective-C isn't what you think it is
#62Re: Objective-C isn't what you think it is
#63Earlier quoted context omitted.
Until some other cool library you really want to use happens to also have a NSArray. With proper namespaces/modules, such conflicts can be usually sorted out by renaming on import. With C and Objective-C, good luck.
Then there must be some other cool library you really want to use happens to also have the namespace "std" and a "vector" class inside...
#include
namespace betterns = std;Re: Objective-C isn't what you think it is
#64Earlier quoted context omitted.
Until some other cool library you really want to use happens to also have a NSArray. With proper namespaces/modules, such conflicts can be usually sorted out by renaming on import. With C and Objective-C, good luck.
If a cool library you want also has a class named NSArray, then you just refactor it by renaming on import like you just mentioned. It's literally the exact same thing as what you're saying. Say I have one library in my project already - we'll call it BGAddressBook. And then I find another library that I really want to add that also happens to be named the exact same - BGAddressBook. So, I would refactor one of them…
Re: Objective-C isn't what you think it is
#65Yes. Using objc_msgSend and NSSelectorFromString, you can call functions, dynamically by name in Objective C. Yes, it's dangerous. Clever, and not quite as easy as your favorite dynamic scripting language, but Obj-C supports it. My favorite personal use case so far is an Objective-C state machine, where state names are strings, and state callback functions can be added to the code & called without declaration. It's n…
You can even do it in POSIX C with dlsym.
Re: Objective-C isn't what you think it is
#66> Objective-C isn't what you think it is A language without namespaces, that's used almost exclusively for iOS apps and nothing else. Nope, that's exactly what I think it is.
Re: Objective-C isn't what you think it is
#67Earlier quoted context omitted.
If a cool library you want also has a class named NSArray, then you just refactor it by renaming on import like you just mentioned. It's literally the exact same thing as what you're saying. Say I have one library in my project already - we'll call it BGAddressBook. And then I find another library that I really want to add that also happens to be named the exact same - BGAddressBook. So, I would refactor one of them…
How do you refactor third party libraries delivered as binary?
Re: Objective-C isn't what you think it is
#68Earlier quoted context omitted.
Then there must be some other cool library you really want to use happens to also have the namespace "std" and a "vector" class inside...
#include namespace betterns = std;
All that has been accomplished by the namespace alias is that before, both libraries were accessible through "std", and now, both libraries are accessible through both "std" and "betterns".
Namespaces gives you the tools to make name clashes less likely, but they don't make them impossible. Generally to avoid clashes totally you need a central arbiter of name ownership like, say, the DNS registry, which is why naming your packages using inverted domain names was advocated by some people in the Java community.
Re: Objective-C isn't what you think it is
#69i enjoyed this b/c i recently made the jump from ruby to obj-C and, though scary at first, i now feel incredibly comfortable working in obj-C and think i even prefer it. so, that's cool. i do see at the bottom that this post is one of those "inbound marketing for job candidates" things. that's cool, too... but, i gotta say, as soon as i read the sign off, "If you want to work somewhere where..." i thought to myself,…
Isn't Rap Genius basically an online Talmud meant for anything?
Re: Objective-C isn't what you think it is
#70AFAIK Objective-C does indeed have dynamic features. It's also static & weak. So I already have a problem with the first line of the article: > Ruby and Objective-C look like opposites: one is dynamic, the other's static; EDIT: Just read that the author basically denies those claims in the next paragraph.