4 ms·
If a problem can be simply modeled by state machines, use OO. If it's simpler to model a solution using function composition, use FP. You can write shit code in
by Cieplak 10y ago
If a problem can be simply modeled by state machines, use OO. If it's simpler to model a solution using function composition, use FP. You can write shit code in any language, but patterns are timeless.
- zzzcpan 10y agoAny problem can be modeled by either of those things. What matters is whether you abstract your state mutations or scatter them all over the place.
- Cieplak 10y agoAbsolutely agreed. Goal should be simplicity with a healthy dose of mechanical sympathy.
- bch 10y ago> healthy dose of mechanical sympathy This is interesting -- it's something I think about too, but it's not clear to me what it _really_ means, unless its a personal thing specific to ea. developer being sympathetic, and is just meant to mean "Are you mindful of what's going on? If not, pause until you are". Maybe then one sees earlier pitfalls, or chances to succeed.
- jimmaswell 10y agoCan be, yes, but that doesn't mean modeling it that way would be sane. Working with a fully FP game engine sounds terrible, for example.
- weavejester 10y agoWhy do you say that?
- efnx 10y agoThe hard part is figuring out what that should look like. There are hardly any purely functional game libraries (graphics, physics, sound) so to say that an entire engine sounds horrible makes no sense. What would that horrible even look like?
- stcredzero 10y agoAgreed. I'll add, ask yourself: - Will it cost a lot to change your mind? - Will this make it harder to debug or easier? - How long have I gone without a big, costly/risky rewrite? This is what it means to have a good or a bad architecture.
- olalonde 10y agoCan we all stop repeating those platitudes / tautologies please?
- wbillingsley 10y agoWell, that or we could identify them as common repeated argumentative elements, attach names to them, and call them rhetorical patterns :)
- wwosik 10y agoThis has been already thought of: https://en.wikipedia.org/wiki/The_Futurological_Congress https://en.wikipedia.org/wiki/The_Futurological_Congress " Instead, papers are distributed in hard copy and speakers call out paragraph numbers to call attention to their most salient points."