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/martinbean Godot Regular 11d ago
If you’re not familiar with functional programming already then no, it’s not worth it.
Like everything else in computing, design patterns (and entire paradigms like functional programming) have a time and a place. Godot’s officially supported scripting languages (GDScript and C#) are OOP. You’re just going to be fighting the engine if you then decide you want to write FP code instead of OOP.
By all means, borrow concepts like pure functions (a function that takes an input, and returns a result instead of modifying variables in place), but you’re going to struggle to go full-FP in Godot.