3 ms·
> C ABI library protocols, and offered stdio and socket interfaces to them, then suddenly the landscape of possibilities in software composition would be way br
by Kamq 3y ago
> C ABI library protocols, and offered stdio and socket interfaces to them, then suddenly the landscape of possibilities in software composition would be way broader.
I think it would have reduced composition in practice. Part of what you get out of "text as the universal interface" is tools that never heard of each other being able to work together. Because there's only a couple types: string, maybe number depending on the context, list (strings separated by spaces or newlines) and record (single line of a csv/tsv file), things can be kinda coerced into working together.
You could get this with a type system... if you restrict yourself to at the most advanced List<String>, Map<String, String>, but you've lost ~80% of your type system value. As soon as anyone defines a custom struct, only tools that have heard of that type (which, in practice, end up being tools specifically made to work with it) can use it. Just using text with a few conventions is a really high utility point on the pareto curve for basically zero work.
I could see some benefit in getting a system defined Path/URL type, but you'd really need to have a culture of sticking to built in types, and a system that offers types to cover basically every use-case.
- binary132 3y agoIt's really hard for me to imagine a world being _less_ useful where a program like ls not only specifies the structure of its output in a way I can automatically read fields of without hand-parsing it, but also can be used by linking instead of having to run it in a subprocess whose input and output I have to manage, buffer, and so on and so forth.
- Kamq 3y ago> useful where a program like ls not only specifies the structure of its output in a way I can automatically read fields of without hand-parsing it I don't think C ABI gets you this. Passing structs across ABI boundaries is kinda iffy, especially if you're using a different compiler than the program was originally compiled with. And lord knows what non-C programs would try to do.
- binary132 3y agoI get it but all I can hear over and over is “arbitrary strings are better than a sound typesystem” and we all know that’s just not true.