Honestly, I find that attitude quite frustrating (not singling anyone out here).
Often on these forums, when someone posts “How do I do X?”, people will reply “Why do you want X? You should do Y instead.”
Even if Y is usually preferable to X, it is still worth learning and knowing how to do X.
For the case at hand, the About Swift page states that Swift is designed for many uses, including systems programming. In fact, systems programming is the first use-case listed.
Systems programming often involves directly manipulating raw memory to construct higher-level objects, and that is what I am asking about here.
I was a little haughty when I said that . Though I still stand my ground not to touch references lightly. Two comments in and we already forgot ARC at a few places.
I did try a few things, but most end up using UnsafeMutablePointer which is more-or-less IUO at this point, and we might just as well let the compiler handles it.