[Haskell-cafe] ANN: network

Niklas Hamb├╝chen mail at nh2.me
Sat Jan 19 15:56:46 UTC 2019

Hey Evan,

it's great that work is being done on network, that is very appreciated.
I do find one thing problematic though:

Why do breaking type changes like `fdSocket` and `mkSocket` not go through a deprecation cycle?

It's a best-practice to not break types of fundamental packages unless absolutely necessary.
In this case it seems like these functions could have been deprecated, kept forever, and new functions with the improved types could have been added.
This would avoid breakage for network's many users.

Given that rest of the changelog in which deprecations are mentioned, it seems `network` contributers generall understand that and agree on that. Why was the deprecation approach not chosen for these functions?

What in general is network's decision process for deprecation vs breaking change? Was any analysis performed that showed that only the fewest of network's 926 Hackage dependencies use these functions? Or should we expect major ecosystem breakages?

Also interesting is that in https://github.com/haskell/network/commit/d69c3072071859a28a442ff713e90f8499882d21 `fdSocket` was deprecated, but that deprecation was about a slightly different change and never made it into any Hackage release so users never saw an advance hint that `fdSocket` would soon be changed.

Personally, it bugs me out that we can't get deprecations right in Haskell, when other ecosystems have understood and successfully executed the "deprecate and make better functions" approach for a very long time. But I'd be happy to hear why I'm wrong and this approach couldn't be used here.


More information about the Haskell-Cafe mailing list