I’m beginning to think that the right solution for “shared mutable everything” systems like COM/Obj-C/DOM in Rust (and similar languages) is to wall them off from the rest of the language entirely.
-
Show this thread
-
That is: references inside those objects just don’t exist. Consequences include: you can’t use Vec<_> inside those objects: instead you use SAFEARRAY or CFArray or whatever. You can’t use String: use BSTR or CFString. Etc.
2 replies 0 retweets 5 likesShow this thread -
This is basically how all COM-like systems work anyway. They don’t generally use raw C strings and C arrays, they always create their own types.
1 reply 0 retweets 3 likesShow this thread -
Replying to @pcwalton
However, Cocoa/Foundation make it more palatable by "cheating" with 0-cost bridging of basic NS* and CF* types.
1 reply 0 retweets 0 likes
Well, there isn’t a relevant difference between Core Foundation and Foundation for these purposes. Raw C strings mean “char *”.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.