Elektrine lite

← Feed

@hengymrohebwlad@mstdn.social

Post #2437913

2024-03-04 16:22 UTC

@fabs@mastodon.gamedev.place Interesting. I'm pretty sure Design Patterns were embedded in things like frameworks and libraries for OO languages such as Java. I remember trying to figure out how to use GoF patterns when learning Java many years ago. When I started learning functional programming (Scala) later, I discovered you don't need half the GoF patterns in FP, because they're basically about tricking an object into adding new behaviour. In FP you can just pass behaviour around via functions. Much easier!

Replies (1)

  • @fabs@mastodon.gamedev.place 2024-03-04 21:04

    @hengymrohebwlad@mstdn.social quite right. However, there are thousands of other patterns which aren't just "OO does function pointers badly" :D

    Open ##2437914