@mazyod
iOS/OSX and Game Development
Nothing here yet.
Nothing here yet.
No blogs yet.
I agree with about 90% of what you say, except the modeling part. I think that part is subjective, and I've trained myself to model programs in a functional rather than an OO manner. In fact, my programming speed in regular OO apps (iOS) dropped thanks to the need for me to write everything in a functional manner. A good side effect as well, however, is even my OO code is testable nowadays, just what functional programs are inherently good at.
You don't know what you're getting yourself into with this question, since it might get political very quickly, lol. I am not blaming you, though, we all deserve to know. One opinionated developer kept telling me that since the humble days of emerging programming languages, a certain company had launched what he called "an attack" on functional programming, and that made OOP prevail. OOP is taught in schools, and usually is the first encounter any new programmer encounters, making them clinch tight to it. That is all to say, OOP is popular because a business wanted to push their product, not because it was better.. That is one opinion. My opinion would simply be the practical use cases for functional programs are less. Multi-core smart phones aren't new at all, and most frameworks we use to build products are still stuck in the single threaded era, making functional programming less appealing. After all, in functional programming you are incurring a lot of copying thanks to the immutable state of the objects, it might be pointless in a single threaded environment. Another thing about functional programming that I found annoying was scripting. I love Elixir, but I'll probably use python for scripting small stuff forever, since it's just so easy to preserve an object's state. Or, maybe it is easy for me since I grew as an OOP developer, who knows? I would like to conclude with a reference to PHP. People love PHP, others wanna burn it to the ground. We can at least agree from that, it doesn't beat other languages in its field if that's the case, and yet... It's super popular.
I've started using Elixir beginning of 2016, and the reason is quite simple... Object oriented programming for backend sucks (IMHO). You really need the concurrency, fault tolerance, monitoring, logging, ... etc. Why not use a language that ships with all that out of the box, instead of dealing with dependency fatigue? I spent the same amount of time learning and writing a basic Elixir server as I did simply trying to figure out how RoR works its magic behind the scenes. Look, I've already built the same backend in Python, Ruby, and even C++. It never 'clicked' so well as much as it did when I switched to Elixir. I dare say, Elixir felt like the simplicity of Node coupled with the power of C++. With all that being said, what is my use case? My use case is a realtime backend for a game. The game has a wide set of features, and require a very versatile language. Elixir had me covered on those parts. What are other great traits about Elixir? The tools around this language are super. Hex and mix your dependencies in a very simple manner (granted I don't like the .hex in the home directory. Makes dockerizing a pain). iex, debug printing, and syntax are all pluses for me, ever since I learned to write my logic in a functional manner. The most appealing part of Elixir, however, was the micro-services approach it takes. It is just mind-blowing how you set up multiple applications and supervisors... within the same application! This allowed me to write a matchmaking server, a lobby server, a game server, all within the same code base, each managed separately. That, my dear reader, is just priceless for prototyping and eventually shipping your application. Sorry for the rant, and unsolicited pitch to Elixir, but probably all other functional programming languages are just as good.