Gabriel Shanahan
01/01/2024, 4:43 PMRobert Jaros
01/01/2024, 4:48 PMRobert Jaros
01/01/2024, 4:52 PMGabriel Shanahan
01/01/2024, 4:53 PMJacob
01/01/2024, 6:59 PMclose
methodJacob
01/01/2024, 7:26 PMGabriel Shanahan
01/01/2024, 7:33 PMclose
method
Thanks for the tip, I honestly never realized that Stream was closable, and I can't quite wrap my head around the motivation for it (but that's probably because I haven't spent any time actually using it IRL).
> I'm of the opinion that everyone is using result wrong 🙂
There's a large discussion to be had about this, my frank TL;DR is "kotlin.Result show you a path that you should walk, but not using kotlin.Result". My next big target is to do a series on Arrow, and this is basically all it's going to be about. I do want to revisit the sections on Result though, and a) write some more about why exceptions are bad, and b) write some more about how using kotlins Result implementation (which is basically a butchered Either implementation) also isn't ideal.Benoît Liessens
01/01/2024, 9:48 PMkotlin.Result
💪Cies
01/02/2024, 9:25 AMCies
01/02/2024, 9:55 AMdata classes
and other data defs separate from functions; instead of lumping them together in classes) is preferred. We use FP-techniques where ever it makes sense, while not sweating the use of OOP-techniques when more pragmatic.Klitos Kyriacou
01/03/2024, 10:35 AMval instantFilterResult = mutableListOf<Post>()
should be changed from for(post in this) {
to for(post in authorFilterResult) {
. (playground)Gabriel Shanahan
01/03/2024, 6:43 PM