I know. But your example is basically C masquerading as Swift. You're using only C library calls, doing manual memory management, etc. With only superficial syntax changes your example would be perfectly valid C.
I do like that Swift allows this. Actually having to write C modules and link them in etc is more annoying. I'm just not enthusiastic about having to write this sort of Swift.