TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

C++ Versus Objective-C

34 pointsby TechNewbover 13 years ago

6 comments

forrestthewoodsover 13 years ago
I hate Obj-C with a fiery passion. My single biggest issue with it is that it simply does not make my life as a programmer any easier. On the other hand when I work in C# I am constantly amazed at how damned easy the language and the libraries make my life.<p>Not once when using Obj-C have I ever said, "Wow, that was so easy thanks to Obj-C!!!" I am more likely to curse the heavens as to why the debugger can't show me the contents of any basic container type.<p>Going forward my work will be as heavily cross-platform C++ as I can make it. The UI may be done through platform native interface constructs, but everything I can possibly make C++ I will.
评论 #3341280 未加载
评论 #3341282 未加载
评论 #3341327 未加载
评论 #3341782 未加载
wsc981over 13 years ago
I've never really programmed in C++, but I have to say (as an iOS developer who's programmed in Java, Basic, C# in the past) I love Objective-C. It's really easy to write good, object-oriënted code in the language and it got so much better with the release of iOS 5 and the new SDK, especially because of ARC. I'm not sure if C++ has anything comparable to ARC.
评论 #3341077 未加载
评论 #3341059 未加载
Apocryphonover 13 years ago
This is an interesting (though incredibly dated study) from an academic standpoint because both languages are supersets of C and represent two different lineages (Simula vs. Smalltalk). That said a more modern and useful study might be a set of comparisons between Objective-C and Java, since they are the current mobile dev languages of choice.
评论 #3341507 未加载
评论 #3341132 未加载
runn1ngover 13 years ago
The thing that this 1997 is missing is the retain - release mechanism, found "only" in classes, that are derived from in NSObject, and still a key Obj-C feature.<p>I don't really know when exactly was this added to NeXT/Cocoa API, but I think it's important to note.
bdfh42over 13 years ago
If this is a contest - then I declare "No Contest".<p>C++ is a standards based language available across multiple platforms and the other one isn't.
评论 #3340602 未加载
评论 #3341010 未加载
评论 #3340558 未加载
评论 #3340581 未加载
cplusoopover 13 years ago
The lack of destructors and constructors makes Objective C miss an entire galaxy of functionality. That the language authors and programmers don't sorely miss this feature is a testimony to the limited understanding they have of programming. Lack of destruct-when-I-leave-scope makes real exception semantics impossible, and no "smart" objects that clean up after themselves meaning it's impossible to create abstract data types with such limited features. Programmers who don't miss these features I call "flat programmers" because they are missing an entire dimension in their code. They are forever having to understand the details of their implementations instead of being able to package up functionality from initialization to destruction in abstract terms. Don't bother trying to explain any of this to them. People don't understand what they don't understand. They don't even know what they are missing. But I suppose this is appropriate for Apple programmers who are more concerned about which pixels appear in a drop down list box than the overall job their program is attempting to do.
评论 #3340951 未加载
评论 #3340732 未加载
评论 #3340755 未加载
评论 #3341002 未加载
评论 #3341256 未加载
评论 #3340952 未加载