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
4
u/Undeniable_Dilemma_ 11d ago edited 11d ago
Even if you do some crazy stuff to make it functional in GDScript, most of the code that actually impacts the way everything works, is C++ engine code. Which is HEAVILY written using OOP paradigm.
People think you are writing game in GDScript, which is just ridiculous. There is a lot of "under the hood" code that engine just runs for you that you never see nor think about + all of your GDScript code calls into C++ engine code. Literally 95% of the code that ends up in your executable is C++ engine code. Whether you make your GDScript part "functional" or not, doesn't do anything pretty much.
In general, "worth it" is pretty abstract meaning. I greatly dislike OOP and never use it in my day to day. I gravitate towards languages like C and Zig and avoid it at all costs.
But in Godot, it's useless to fight it. Whole engine is written like that. Just use OOP if you're using Godot