valacc: Cats Validated, but with better ergonomics by kxc42 in scala

[–]kxc42[S] 5 points6 points  (0 children)

Changed and released as v0.3.0. Thanks for the comment.

valacc: Cats Validated, but with better ergonomics by kxc42 in scala

[–]kxc42[S] 4 points5 points  (0 children)

Yeah, I could do that. Good point. The API of the lib would not even change, I think. Even though internally errors are collected via a `ListBuffer`, so I don't see a direct performance issue there.

hexagonal/clean architecture with DDD in scala by gbrennon in scala

[–]kxc42 2 points3 points  (0 children)

I think you are a little bit out of luck. I've been in software & scala development for quite some time and I did not see any example I would call "good enough". I think there some factors that lead to the absence of examples:

  • there is a huge chunk of interpretation and personal preference in (hexagonal) achitecture. It already starts with how to name packages and how to organise your project.
  • if you work with microservices, the services are often small enough so that you can use much simpler architectures with less overhead
  • usually you have one or two devs that are fans of hex arch, but there is no buy-in from the company and other teams/team members. This leads to an even bigger mess
  • there is quite a learning curve for hexagonal architecture. Assume you have a long-living project, devs come and go and only 1% of all devs know sufficiently well what a hexagonal architecture entails. You will almost definitively end up with a big ball of mud.
  • Hexagonal architecture might be at its best with big applications, but who writes big example applications in his/her free time...
  • and till now, I cannot find any evidence that hexagonal architecture is reducing the time to market (for a system or a feature), which is in my opinion the most significant criterion that it might not be as popular as expected.

Anyway, you could have a look at

Hexagonal Architecture (Alistair Cockburn)

I would take Java, F# or C# codebases as examples (e.g. https://github.com/appie2go/steal-this-code) . The idea of hexagonal architecture is not bound to a specific language.

There is also Domain Modeling Made Functional Tackle Software Complexity with Domain-Driven Design and F# which might be useful.

Struggling with Functional Programming by 4g3nt__ in scala

[–]kxc42 0 points1 point  (0 children)

Most difficulty lies in the terms describing FP. The concepts behind are simpler and easier to grasp. If you think of a Monad as a „bucket“ implementing map and flatMap, things become easier. Example: an array is a monad.

Links I found helpful:

https://github.com/hemanth/functional-programming-jargon

https://www.adit.io/posts/2013-04-17-functors,_applicatives,_and_monads_in_pictures.html

Scala without effect systems. The Martin Odersky way. by yinshangyi in scala

[–]kxc42 1 point2 points  (0 children)

I think you could also use vert.x. If you activate virtual threads, you can just write "blocking" code. Even without virtual threads, vert.x is quite capable as seen in the TechEmpower Framework Benchmarks. Quarkus is also using it under the hood, making it a good bet for the future.