2 ms·
I agree that wrapping can and does work in most cases. But then there are times when it doesn't work without introducing a lot of complexity and/or inefficiency
by fauigerzigerk 10y ago
I agree that wrapping can and does work in most cases. But then there are times when it doesn't work without introducing a lot of complexity and/or inefficiency or without limiting design choices.
How will the new concurrency/parallelism facilities they are planning for Swift work with libdispatch queues? Will they want to build on GCD or not? Will whatever they do work for Objective-C just as conveniently? That's an open question in my view.
For an example why wrapping cannot work efficiently in all cases look no further than Python 2 vs Python 3 strings. They are conceptually too different.
With enough "waste" of resources everything can be wrapped. I don't know how React Native works. But React.js uses a virtual DOM that effectively doubles memory usage. That's what gives them the freedom to use a completely different approach to updating the UI.
I put "waste" in quotes because sometimes paying for a more productive and simpler system with higher resource consumption is the right thing to do. But in other cases it is not.
- rtpg 10y agoTo be honest, I don't think the DOM structure itself is what consumes the most memory. It's about priorities, and having the UI building blocks be a bit slower is probably fine, because the actual UI internals will still be fast. How many times do you need to reflow your UI? Though I'm not super aware of what Cocoa actually covers, my impression is that it's mainly UI libraries.