jwiegley / async-pool

Other
21 stars 13 forks source link

get rid of unsafeCoerce #27

Closed l29ah closed 1 year ago

jwiegley commented 1 year ago

Can you say more to motivate this change? unsafeCoerce seems justified in its current use.

unclechu commented 1 year ago

@jwiegley I think any use of unsafe* functions is justified only in case there are no other safe options. In this case there’s one, as shown in the change. It does not add much more complexity to the solution that was already there. To me the motivation is clear. When I write Haskell code I want types, I want safe, I want unsafe* to be avoided unless impossible.