Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Victim of trying it the first week it came out, having to call down into C for anything POSIX, and giving up. If you don't have POSIX bindings, don't call yourself v 1.0.


What exactly do you mean "call down into C"? You should be able to call C functions directly from Swift, albeit with UnsafePointer and the like.


I've been using Swift for a few months and really want to like it. That said, breaking down to unsafepointer for newbie tasks is unacceptable IMHO. Try to do basic stuff like TCP/IP socket coms without a third party library or heck, just get the IPv4 address of your network interface.


I assume, they mean that you don't need to have C at all. See how Go for example doesn't require C on most platforms to make syscalls (IIRC, the exceptions are Windows and Solaris).


So, based on this[1] they've just wrapped the calls with their own…not sure if there are any real benefits here.

[1]: https://golang.org/src/syscall/syscall_linux.go




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: