BSD socket API revamp
Very interesting idea overall.  I&#x27;ve long thought the current segregation of network protocols between userland and the kernel is rather arbitrary and inflexible - why should reliability (TCP) be in the kernel but security (TLS) be in userland?<p>I don&#x27;t think the idea of requiring Go-style lightweight threading is viable.  Lightweight threading has many nice properties, but also inherently requires more expensive operations to deal with split stacks, and tends to use more memory than a manual approach.  It&#x27;s also rather poorly supported in general by existing languages and OSes (other than Go), while any new OS-level socket API should be as universally accessible as the existing one.  In particular, <i>many</i> scripting-ish languages either have no concept of threading at all or only support isolated threads whose communication is limited to relatively slow message passing.  In theory the language implementations could write a C shim to expose a non-blocking interface around blocking underlying operations - this is what libuv does today for file I&#x2F;O, for instance - but the result would be a lot of unnecessary overhead.