News for hackers. Stuff that matters.
Re:On Composition (2019) by skybrian on Thursday January 16, 2020 @12:25PM (#22066657)
Even within a language there can be barriers to composition, as described in What Color Is Your Function [1].

When you have a sophisticated type system, it's very tempting to make fine distinctions that prevent mistakes by preventing unlike things from being composed. But whenever there is more than one way to define an API, interfaces can differ in detail, so things can't easily be plugged together even though their interface does basically the same thing. (You can have different kinds of strings, for example.) The result is having to write a lot of adapter code. (Rust in particular worries me due to its way of exposing fine-grained detail in public API's.)

Enabling composition in practice means coming up with nice common interfaces and promoting the hell out of them so everyone uses them. This is basically about standardization. Cross-language standardization is pretty hard.

[1] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

There are no comments on this comment yet.