| > In, say, the Scala ecosystem... limited scope isn't so brilliant. Sometimes you just can't do limited scope. As in Scala the programming language? I find it is exactly the opposite. Scala is complicated and hard to learn, but if it can do anything well then it is allowing tools/libraries to be well-scoped and composed by the user. To give an example:
In Scala there are 3 libraries:
- One for http requests
- One for async calls
- One for json (de)serialization Those libraries don't know anything of each other and don't use the same interfaces/types, so by default you have to do some plumbing to make them work together. But there are 2 more libraries:
- One that provides integration of http and json
- One the provides integration of http and async As an end user that wants to build an async web app that uses json, you just have to add those 5 libraries and 5 imports and then everything just magically works out of the box. And it compile-time safe. No reflection or magic things happening. If anything doesn't work out, for example due to version differences, then it just doesn't compile and you adjust the plumbing yourself or update the libraries. I seriously don't know any even half popular language that supports that. Take Rust for example. Rust has traits and allows you to make whatever types you have become compatible. But you can't write libraries on top of existing ones to do the plumbing for the user who then just picks the plumbing they like. |
In Zig, I am using a TLS library that does not perform I/O, it just writes to writers and reads from readers, so using it with io_uring or DPDK or send/recv or pcap files requires 0 additional work.