3 ms·
This is great. I played around with Swift three years ago and tried to use the socket APIs. In the end, it felt like I was essentially writing C just with prett
by rubiquity 6y ago
This is great. I played around with Swift three years ago and tried to use the socket APIs. In the end, it felt like I was essentially writing C just with prettier syntax. Now that we have safer languages we need safer foundational pieces too.
As a side note, the approach that Swift is taking here is exactly what I really like about the Zig programming language. The standard library nearly exclusively takes the approach of wrapping the system calls so you get nice Zig error types rather than the archaic return codes. These things go a long way in making correct usage of really essential but hard to use APIs possible.
- pjmlp 6y agoWe always had them. What we have now is the acknowledgement that after 60 years even 10x C developers don't write corruption free code.