Re:Why I Develop For The Mac
by gte910h on Sunday May 05, 2013 @11:17PM
(#5660746)
C++ isn't a pure win. It's far more complex, and leaky abstraction wise than Objective C is. MOST people write mac and iOS apps in Objective C, and it works well, is predictable. It's also far easier to find people who do Obj-C well than C++ (in the mac environment, but this holds for all systems I've ever seen as well).
[ Parent
| on HN ]
It's difficult to say which is the leakier abstraction, but I feel that in C++ I have the option of writing only high level code.
In Obj-C it's not unusual to have to mix in C. And sometimes the code I write is quite fragile due to the type system and not having some features available.
My main issue with Objective-C is that we are in 2013 and the language still lacks namespaces.
Prefixing names is just something no developer should be forced to do.
I hope with the work being done in clang for C++ modules, Objective-C gets some form of namespaces as well.
The worst thing about C++ for UI work is that it offers essentially no introspection and is a nightmare for tools authors. It's good for writing high-performance application kernels but for everyday UI building it's just overly complex and awkward.
Also agree that QML is light years ahead of anything else for UI work. Declarative is the way to go, but most are focusing in the wrong direction (e.g storyboards).
Any programming language will be awful for UIs, be it C++, Obj-C, Python or C#.
Qt for example uses hybrid approach. UI itself is not defined it C++, rather in declarative language (QML). C++ is used for application logic. That wasn't so in Qt from the start, but was brought there because of dynamic UI requirements, especially on mobile.