Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Curious; what makes ObjC not a viable competitor IYHO?

D is doomed by the Phobos/Tango schism, no-one would risk their business on it.



Curious; what makes ObjC not a viable competitor?

The Objective-C additions just aren't very low-level. They're basically an object runtime library with some syntactic sugar. This is fine for situations where you want something a bit more high level and dynamic[1], but gives you no advantage over C in something like device drivers or programming embedded devices, because you just aren't going to use those features. Minimalistic (optional!) vtable dynamic dispatch is great for these uses, though, and generic programming can be really nice (despite C++'s version in the shape of templates) even for low-level applications. RAII also is really nice.

D is doomed by the Phobos/Tango schism, no-one would risk their business on it.

If D was that much better, I think a sufficient open-source ecosystem would spring up around at least one of the two libraries that you could realistically use it. As it is, I doubt it would be popular even without the schism.

[1] Though in my opinion, most iOS apps would be easier to write in a managed language, especially if you could call out to C/C++. The Obj-C focus is understandable from Apple's point of view though.


"Though in my opinion, most iOS apps would be easier to write in a managed language"

Maybe, but just as you can not easily dismiss C++ because so many people have written so many successful programs in it, it is difficult to dismiss all of the great software from Apple, and arguably the largest library of software for mobile devices in the App Store, written in Objective C.

You point out the resource constraints that make C++ superior to Objective C and other languages for drivers and embedded systems. Similarly, I suspect Objective C gives Apple the right trade offs for writing sophisticated software for mobile devices that is responsive, uses memory effectively, and does not kill battery life.


FWIW, I agree that it's not a black & white issue, and I don't have an immediate suggestion for a replacement language that would be better than Objective-C in every aspect.


I thought that one of them was going away with D2?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: