Hacker News new | ask | show | jobs
by fowlerpower 3572 days ago
I really believe the future is a mixed OOP and FP world. I think we will see industry use languages like Scala and F# more and more.

In mission critical portions of systems people will use a functional style and try to isolate state, while most things in an OO style will be just fine.

I also believe the crazy complexity of OO languages like Java is slowly being reigned in. With other languages like Go explicitly making trade offs towards simplicity.

3 comments

I have no stake in pro-Go or anti-Go statements here, but I do want to say that a simple language does not always lead to simple code in that language.

For example, if one has to copy and paste because a language is too simple to provide a needed abstraction, then the code is needlessly complicated (through duplication) because the language is too simple.

Exactly. C is a vastly smaller language than C++ but OO C is very complex with factories booking up function pointers, lots of macros, etc.

Creating an object with runtime polymorphism in C++ is much simpler.

>In mission critical portions of systems people will use a functional style and try to isolate state, while most things in an OO style will be just fine.

What makes you think that programmers who are used to writing in FP style for mission critical components would step away from FP for OOP for less important code? In my experience, most of the time functional code is often more succinct and easier to write. I don't think it would benefit anyone to write the majority of an application in the more verbose style.

>languages like Go explicitly making trade offs towards simplicity

I think Go is a counterargument to your point here. It's simplicity makes it much less suited for multi-paradigm programming than a complex language like C++ or Scala.

> I also believe the crazy complexity of OO languages like Java is slowly being reigned in.

Java itself is a pretty simple language, and the complexity of programs written in Java is partially due to the spareness of the language.

Java didn't have generics either, until Java 5, when they've added an implementation with use-site variance with wilcards, for backwards compatibility reasons probably, but which is very user unfriendly. The irony is people complain about type erasure as being Java's problem, when in fact that has been one of its greatest features.

But anyway, the creators of Go where right to fear generics, b/c generics are hard. However the more time passes, the harder it is going to be to add. And truth is it's inevitable for generics to happen in Go and when they'll do they'll be half baked.

And remember that Java has striking similarities. Java is also a very opinionated and anti-intellectual language.