Re:Post-Architecture: Premature Abstraction Is the Root of A...
by alex-robbins on Thursday July 18, 2024 @03:06PM
(#40998747)
When you write a procedure that has to maintain an internal state between calls, stopping what you're doing and switching to functional programming makes sense.
Re:Post-Architecture: Premature Abstraction Is the Root of A...
by arendjr on Thursday July 18, 2024 @02:28PM
(#40998403)
Just know that if you do this, you’re injecting statefulness in the center of wherever it was this procedure was being used. If your entire system already has statefulness everywhere, nobody will bet an eye. But if you want to have any chance at creating a functional core or island, it’s the opposite of what you should be doing.
C# will silently create hidden closure classes for you when you use lambdas or yield.