bootzooka icon indicating copy to clipboard operation
bootzooka copied to clipboard

Remove IO dependency from DB module

Open herr-bubu opened this issue 2 years ago • 4 comments

This PR removes IO dependency from DB module :)

herr-bubu avatar Nov 19 '22 17:11 herr-bubu

Thanks :) Why the DB module, and not others?

adamw avatar Nov 21 '22 20:11 adamw

@adamw baby steps :) I'll have more soon, so probably by the end of the year we'll have this one done :)

herr-bubu avatar Nov 22 '22 07:11 herr-bubu

Ok, I guess we'd need to make up our minds if we want to go full-tagless-final, or keep the current approach of a hybrid (using a concrete effect IO where possible, tagless final only when necessary). The first one is uniform, the second provides simpler development of most services. So I'm on the fence :)

adamw avatar Nov 26 '22 10:11 adamw

I went through writing everything in TF-way to simply using concrete effect like cats IO everywhere instead, this was a long journey but today I think that writing all your code tagless final just for the sake of it, brings nothing to the table and only complicates things and slows down development. I understand that its a nice exercise but I would use it only in places where we can actually gain smth from it, eg. handling errors with Cats MTL. And yes, I understand that you can use different effect in your tests or maybe easier swap cats IO for smth else in the future but no one does it :)

softberries avatar Nov 28 '22 11:11 softberries