has anyone ever researched/documented the interaction between encoding a large number of effects/dependent-types and API evolution? I'm concerned "usable" forms require lots of inference, which means lots of potential breaking changes to public APIs.
-
Show this thread
-
Or even without inference, public APIs have to encode lots of incidental facts you wouldn't normally document that dramatically constrain the implementation.
2 replies 0 retweets 4 likesShow this thread -
Example in Rust: there's arguments for encoding: allocation, nounwind, simd (and which parts), float usage, atomic usage, i/o, purity, constexpr, thread-affinity, and probably others. This is a lot of things to guarantee/care about!
4 replies 0 retweets 8 likesShow this thread -
Replying to @Gankra_
I vaguely lean towards the C answer here. Public API is what's documented. I `#[nodoc]` everything I don't want to be relied on (and in rare cases just mention in the docs "you shouldn't rely on X"). Of course you still have to consider "does this actually break code" on changes
1 reply 0 retweets 0 likes -
Replying to @sgrif
right but I'm specifically talking about a world where everyone wants you to interoperate with dozens of (potentially adhoc) effects. Every effect you incidentally satisfy that you refuse to document makes your library less useful.
1 reply 0 retweets 2 likes -
Replying to @Gankra_
Yup, this is the world I live in. I think it's easy to over-estimate how bad it is, as long as you actively consider "what realistically could break" with every change, and take the spirit of RFC 1105 to heart.
2 replies 0 retweets 2 likes -
Replying to @sgrif
Do you think this philosophy would be tractable in a world of pervasive dependent typing?
2 replies 0 retweets 0 likes -
Replying to @Gankra_
I don't know that I can give a better answer than "it depends". Maybe you should ask an Idris programmer. ;) For Diesel we work around this by "the public API for the result of this method is this helper type w/ the same name". Associated type values are generally private
1 reply 0 retweets 0 likes -
Replying to @sgrif
r.e. your list of things worth encoding, I think the only one that's really worth doing is constexpr and maybe i/o purity (I generally always lean towards "this type does I/O, other types take this one as an arg" regardless so I don't care as much)
1 reply 0 retweets 0 likes -
Replying to @sgrif
I do think that *in general* spending a lot of time considering how changes will affect your users goes a very long way. If everybody in OSS did this, we would have a lot fewer of these discussions
1 reply 0 retweets 0 likes
There's a lot of value in having a connection with your larger users, and being able to just ask "hey does this commit break your app?". Crater is nice, but ultimately the real breakage is from the servos of the world, and apps of that size are rarely open source.
-
-
Replying to @sgrif
radical reinvisioning of gpl where we make it intractable to be closed source because we will break you if we can't automatically see and update your code for you
1 reply 0 retweets 4 likes -
This Tweet is unavailable.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.