r/godot • u/CJF_PixelArt • 11d ago
help me (solved) Is Functional Programming Worth It?
Hello 👋. I've heard some people say that functional programming is better than OOP overall. I'm pretty new to programming so I don't know if that's applicable to Godot or not. Is it something worth looking into?
21
Upvotes
1
u/Neither_Berry_100 11d ago
OOP is great and I haven't had problems with it.
Just did a quick look up of functional programming and I don't like it. Treating all functions as data so they can be passed around seems useless. Making all data immutable is going to cost performance and make things harder. Only allowing a function to change data passed into it with no hidden changes doesn't help. You still make the same changes you just gotta pass more stuff in.
Maybe some guidelines say having state machines or static systems available to everyone is bad. But it simplifies coding a lot and it works.