Conversation
Notices
-
Embed this notice
After learning to code, I heard that Object Oriented code was bad. Convinced by the arguments, I moved into functional programming. It blew my mind. It changed the way I write code. But I was still implementing a lot of interfaces. Now more than ever. Because ideally, you can build your software like Lego blocks where pieces of it can be easily switched in and out.
Anyway, I moved back to writing TypeScript again, now with new ideas. Hyper minimalism. TSDocs on every function. Fully tested. At first I avoided using classes. But then I realized they're the best way to implement interfaces. Now everything is about interfaces. What's right is the *separation of concerns*. Thanks for coming to my TED Talk.
-
Embed this notice
This describes my programming journey as well. I’ve even described it exactly this way in the past (lego blocks)
Before functional programming a spent a lot of time refactoring and restructuring code. Functional programming teaches you to build composable programs (legos) where you can swap out bits so you never really have to restructure things that often.
It drastically changed the way I write code in every other language. Haskell taught me to separate pure code from effectful code, most languages don’t force this separation of concerns.
I still hate classes though and prefer PoD structs and functions.