Alexander Granin Profile picture
📚 Author 🏗️ Software Architect 🔩 Developer 🌍 Speaker 🔬 Researcher 🧮 Haskell ✒️📜🌌 Sci-fi&Poetry 🧠 Thinker Book: Functional Design and Architecture
May 23, 2023 35 tweets 14 min read
Programming in C++ is like being a patient in a mental hospital. 🧠👩‍🦽

Functional Programming in C++ is when those patients organize a secret mental hospital within the mental hospital and start pretending they are doctors.

🏗️Advanced FP I did in C++ ⬇️ Thread 🧵 Image You might have heard of the wonderful book "Functional Programming in C++" by @ivan_cukic (by @ManningBooks). I highly recommend it. This book will show you many nice FP tricks and tips.

It highlights most of what we call FP, but I went much further in exploring this area. Image
Feb 2, 2023 4 tweets 2 min read
Remember I was very active in 2022?

No? But I was. I've been posting about 1-2 tweets every day, and around a long technical thread each weak.

In December and January, I posted 10% of my usual tweet numbers.

And here is the proof I was suppressed till October. Total impressions in 2022:

January - 175K
Februrary - 119K
March - 121K
April - 69.1K
May - 34K
June- 47K
July - 55.8K
August - 63.4K
September - 75.7K
October - 201K
November - 201K
December - 36.8K (almost no posts)
January 2023 - 106K (almost no posts)
Jan 26, 2023 12 tweets 3 min read
Nice writing. I wish Scala to survive.

In fact, I don't believe that any similar posts can help Haskell.

Scala is on the edge between life and death but is fighting.

But Haskell...

Haskell has crossed this line already. Forever. With no possibility to resurrect. Haskell is dead.

God sees we, reasonable and pragmatic people, tried.

There were clear problems and we knew it.

We were alarming. We were signaling problems. We were suggesting solutions.

But we weren't heard. Never been heard. Neither by Haskell elites nor by the community.
Aug 7, 2020 9 tweets 3 min read
I'm learning ZIO (by @jdegoes), and I can say this framework has so much in common with my frameworks.

ZIO is based on Free monads.

All my frameworks (Node, Hydra, frameworks at @juspay) are based on Free monads.

1/ ZIO and Hydra programs are values which can be interpreted due to the Free monadic nature. Free monads is the best approach to separate interface and implementation. Free monadic programs are simple, maintainable and testable.

2/
Feb 3, 2020 20 tweets 4 min read
"Never use Free Monads.

They are slow.
They produce boilerplate.
They require functors. Functors can’t be composed.
They require interpreters. Interpreters can’t be composed.
So FMs can’t be composed."

These statements are all wrong or completely misleading.

1/
Unfortunately, the FUD about Free Monads was significantly boiled by several articles in which the reasoning was based on the mathematical nature of Free Monads rather on the applicability in a particular tasks. (I won’t provide links to avoid unnecessary conflicts.)

2/
Jun 23, 2019 29 tweets 11 min read
I’m pretty sure there is a big demand for materials about high level architecture and design of big applications in pure FP (Scala, Haskell). This is what I'm actually doing for a long time.

Let me describe the materials I have to the present moment (ongoing thread).

1/
1) Functional Design and Architecture book

In this book, I develop a complete set of tools and approaches for building complex applications in a pure functional language (Haskell).

I’m working on the book currently. 5 chapters are available already:
graninas.com/functional-des…

2/