Re:Why Functional Programming Should Be the Future of Software
by darksaints on Thursday November 03, 2022 @06:38PM
(#33458903)
Nah, I'm not gonna write an essay just for some random dude on the internet. Try writing a game. Like a real one, not tic-tac-toe. You'll learn quickly enough.
[ Parent
| on HN ]
Re:Why Functional Programming Should Be the Future of Software
by hajile on Thursday November 03, 2022 @07:25PM
(#33459387)
An Entity Component System is literally the functional approach to programming under a different name and with mutation by default. There’s even been a huge move toward keeping ECS data classes separate from behaviors. At that point, it’s just a less ergonomic functional approach with better performance due to lower-level languages (though ATS or Rust are just as fast as C).
Maybe you’re thinking of FRP (functional reactive programming), but that isn’t even super mainstream among most functional programmers. I know some small games have used it, but it’s mostly used for specific kinds of UI in languages that enforce immutability and no side effects.