3 ms·
Objective-C is a nice UI glue language but I wouldn't want to write anything of any algorithmic complexity in it. The data structures are just way too awkward a
by cageface 15y ago
Objective-C is a nice UI glue language but I wouldn't want to write anything of any algorithmic complexity in it. The data structures are just way too awkward and manual boxing/unboxing of primitives puts it way over the top.
I write my iOS app UIs in Obj-C but the brains are in a C++ core. The new C++11 support in LLVM 3.0 has tipped the balance that much further.
- blub 15y agoIf you think Obj-C is nice, try Qt's QML - it's a declarative language with JSON-like syntax that also allows you to embed JS and interact with C++. Probably one of the easiest and more powerful ways to create an UI, but not as mature as other consacrated frameworks and not available on iOS anyway. By the way, how do you handle unicode in the C++ core?
- cageface 15y agoI'm kind of stuck with Obj-C on iOS but I can totally believe you could build an abstraction layer like the one you describe over vanilla C++ that would give you most of the benefits of Obj-C. Clang's Obj-C++ support makes it pretty painless to mix Obj-C and C++ as long as you clearly delineate responsibilities. So far I haven't had to do any serious string handling in my C++ engines (mostly audio apps). The new unicode stuff in C++11 ought to make this manageable but I haven't actually tried it yet.
- natesm 15y ago> manual boxing/unboxing of primitives puts it way over the top FWIW: https://github.com/NateStedman/FunSize/blob/master/FunSize/NSObject+FunSize.h#L33 https://github.com/NateStedman/FunSize/blob/master/FunSize/N...