2 ms·
I think you're basically describing the idea of having pure computations on pure data objects as much as possible? In which case, I believe that's fairly idiom
by jdmichal 6y ago
I think you're basically describing the idea of having pure computations on pure data objects as much as possible? In which case, I believe that's fairly idiomatic in functional languages. And it's becoming more common in languages like C# and Java that started out OOP but have introduced enough functional niceties to make that style more idiomatic. I've been doing it in Java for at least three years. Here's a comment I wrote about it from then:
https://news.ycombinator.com/item?id=14687947 https://news.ycombinator.com/item?id=14687947