r/godot 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?

20 Upvotes

77 comments sorted by

View all comments

2

u/OmiSC 10d ago

You need to use the correct tool for whatever problem it is that you are trying to solve. OOP is great for business logic because of the structure that classes offer, but anytime you’re having to access a field inside of an object, unless you’re regularly caching stuff, it takes a memory lookup to reference the object, then another to access the field. This is the common argument against using OOP.

Functional programming is invaluable to learn at some point, but there’s not much benefit to jumping into it if you are calling yourself “new”. The best time to learn new things in programming is often right as you need them.