3 ms·
> A lot of that code for building it up, and the representation, will be written without using the dynamic-disptach and reference-counting features of Objective
by stephencanon 13y ago
> A lot of that code for building it up, and the representation, will be written without using the dynamic-disptach and reference-counting features of Objective-C.
Fixed.
> require careful design, in order to maintain performance and safety.
In my experience, providing both performance and safety always requires careful design, regardless of the language being used. People who insist otherwise usually turn out not to have a very clear understanding of the state of the art with regard to either “performance” or “safety” or both.
This is especially true in the days of ARC, where you can't just store Objective-C types in C structs.
If it hurts when you do it, don’t do it. Some things need to be Obj-C objects. Many things don’t. I realize that this is glib, but it is absolutely possible to efficiently combine low-level “C-style” and high-level "message-passing/collections/object-style" Objective-C. It requires some attention to detail, but so do most things worth doing. As you build up good habits and idioms, it gets easier and easier.
- sdegutis 13y ago> will be written without using the dynamic-disptach and reference-counting features of Objective-C Those are hardly the biggest problems when dropping down to C for data storage, construction, traversal, and analysis.
- stephencanon 13y agoIt’s possible that I’m simply blind to the complexity of these tasks because I regularly do exactly these operations in C (dropping into assembly for performance reasons). If you do something often enough, it does start to seem straightforward. That said, there’s 30+ years worth of software written by other people in C that performs similar tasks. Much of it is horrible and ugly, but there are gems that are exceptionally clear and beautiful (more so than what I’ve seen in almost any other “mainstream” language).