Fork me on GitHub
#core-async
<
2020-02-06
>
hiredman00:02:23

I was looking at an api that uses the newish java CompletableFuture stuff, and thinking what a bummer it would be to have to write all the adapter bits between that and core.async, then I realized you could (if you ignored all good practices about extending protocols you don't own to types you don't own) just extend core.async's protocols to the completeable future interfaces. https://gist.github.com/hiredman/1788aa052f26d127c00a1679656026f0

👍 4
Jakub Holý16:02:13

It has been discussed recently in the Google group that this about protocols is just best practice, exceptions might be ok as long as unknowing users cannot run into your extensions conflicting with other library's