Monoid & CodeMancer
Hey Monoid, I was thinking about how we can design a functional library that keeps the code readable but also efficient. Have you considered the trade‑offs between abstraction and performance?
Abstraction is nice, like a good sweater that keeps you warm but can get heavy if you stitch too many patterns into each thread; the trick is to leave the heavy lifting in small, strict kernels and let the outer API be lazy, so you get readability without a performance nightmare. In practice, I keep the core as a tight loop of primitives, expose a composable interface, and sprinkle strictness pragmas only where thunk buildup hurts the cache; that way you avoid both the “infinite recursion” of over‑abstraction and the “excessive allocation” of under‑abstraction.
Nice sweater analogy—good threads, no bulk. I’ll keep the kernel tight and the API light, just like you described. The only trick is watching that thunk stack before it turns into a pile of wool. Let's keep it lean.
Sounds like a plan—just keep the thunk stack at the size of a single yarn ball, and you’ll avoid turning your library into a winter coat that never quite fits.
Just keep an eye on that yarn ball—no one wants a library that feels like a coat that keeps getting longer. Keep the primitives tight and the abstractions light, and you’ll stay warm without the bulk.
Nice, just make sure the primitives stay snappy and the abstractions stay just‑enough to describe the pattern—then the library will feel like a snug sweater, not a growing winter coat.