r/programming • u/knife_sharpener • Feb 22 '15
Java Makes Programmers Want To Do Absolutely Anything Else With Their Time
http://www.forbes.com/sites/quora/2015/02/21/java-makes-programmers-want-to-do-absolutely-anything-else-with-their-time/
35
Upvotes
3
u/yogthos Feb 23 '15
What context could that statement possibly need.
That's my whole point. Your changes can only affect things within the scope they're made. You can explicitly see what is affected. The way functional programs are written is predominantly by chaining functions together to transform data. When I want to change a result I trace back through the chain to the point where I need to make the change and do it. I'm guaranteed that the change will only have the effect that's explicit.
My current project has been in development by 4 people for 3 years now. So, not exactly what I would call tiny.
Any changed to shared mutable data that are done implicitly. Pretty much how everything works in Java for example. Any time you call a function that doesn't return an explicit value you've got side effects, any time you call a function that does return a value you might have side effects. Mutability is an insane default in my opinion.
You can either have an honor system that you refer to as best practice or have the language do that work for you. I certainly prefer the latter myself.
I could go on as well. I'm not sensationalizing anything, but giving my personal experience working in both types of languages. Vast majority of people who have prefer the functional approach. Pretty much the only people who argue against it are the ones who've have little to no experience working with FP.