3 ms·
You're on to something. I started with database programming, so mostly declarative. That was a joy and I did't need much time to catch up with the senior devel
by kharak 8y ago
You're on to something.
I started with database programming, so mostly declarative. That was a joy and I did't need much time to catch up with the senior developers. Afterwards, I switched my employer and started anew with Java. I was completely overwhelmed and struggle to this day. Last week, I learned a little bit about streams and how functional programming works in Java. To my surprise, that seemed quite easy to understand.
I don't really know why OOP seems so much harder for me to do.
- jayar95 8y agoIf you like the functional aspects of Java, check out kotlin. It's quickly become my favorite programming languages because you get all the benefits of java's strongly typed OOP system with a lot of elegant functional features, and type inference!!
- mrfredward 8y agoHonestly, I thinks it's because a lot of OOP is awkward and forced. When it was the craze, object orientation became an ends instead of a means, and so it taken past the point of being clean and useful. Why do c# and java require every function, including main, be in a class? Why do we need static classes, which are really just a namespace for functions? There's no benefit to the programmer, it only serves the "everything is an object" paradigm. Certain OOP patterns, like the visitor pattern, are really just hacks to make OOP work like functional. I use c# everyday at work and for the most part love it, but there are certain problem domains (anything with significant multithreading) where forced OOP thinking just makes everything harder than it needs to be.
- james_s_tayler 8y agoCurious, can you explain how the visitor pattern is like functional programming? What is it analogous to in FP? It's not a pattern I have ever really wrapped my head around fully, but perhaps there is some structure in functional programming that if I view it through that lens it will make much more sense?