3 ms·
>means unpredictable behavior There is something to be said about making sure it's clear where and when state mutates. But functional code has it's own set of
by JamesBarney 6y ago
>means unpredictable behavior
There is something to be said about making sure it's clear where and when state mutates. But functional code has it's own set of pitfalls. I've seen otherwise good devs struggle like crazy reasoning about complex functional code. (Especially when it comes to performance)
> Real-world-modeling was found a long time ago to be a bad approach to OOP. The author is right to say that classes should represent clearly distinct concepts that are easy to name, but there's no reason those concepts also need to map to real-world entities. Often, they shouldn't.
I 100% disagree with this. Most applications are modeling domain logic and business processes as code. And ideally as many of your classes as possible refer to a concept or should translate to simple and understandable objects in your domain. In an ideal world every class would be named after a concept/entity your domain expert understands and uses.
*Unless you read real world objects as physical objects, but I think the author meant real world as in domain concepts.