A Pragmatist’s Guide to Functional Geekery
summary
A one-week prototype Galactic Twitter shows concrete code: Java (with Vavr (formerly Javaslang)) and Scala side-by-side, using Futures to avoid blocking, Option and Try to distinguish missing vs failed data, and a RemoteData ADT to represent loading/loaded/failed states. Pattern matching creates those ADTs from Try results; folding (via foldLeft folding) implements censorship rules and counts while keeping everything immutable. Type-class style JSON serializers decouple concerns so the web layer gets pure domain values.
AI-written summary · about
