3 ms·
Seems pretty similar to functional programming in that respect. When I write code in languages like Haskell, I tend to focus the most on two things: 1. The con
by tikhonj 5y ago
Seems pretty similar to functional programming in that respect. When I write code in languages like Haskell, I tend to focus the most on two things:
1. The conceptual organization of the code (≈ layout)
2. The interfaces between components (≈ routing)
Static types and functional programming naturally lean into this: types provide a first-class way to sketch out layout and interfaces in code without needing to implement the code in full detail. I'm drawn to static types less because of correctness or preventing bugs—although I can't complain about that!—and more because they give
me a quick, high-level sub-language to sketch out and iterate on the design of my code. Those same types then act as guideposts for how the codebase fits together, making it easier for me to understand projects written by others or revisit code I wrote but don't remember well myself.