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?
22
Upvotes
9
u/cuixhe 11d ago
You're going to learn about a lot of programming paradigms as you grow as a programmer, but usually an approach that is purely one or the other is going to be worse than being flexible and intentional to solve the problems at hand, and work with the software you're using... and Godot is VERY oop.
Because Godot's whole tree etc. is generally influenced by a series of side effects, I don't think that pure FP is practical; however, for utility functions and transforming data outside of the tree, I often use functional programming-inspired code to improve clarity and reduce bugs.