DEV Community

Discussion on: Why Java is the best Programming language to Learn Coding for beginners?

Collapse
 
olvnikon profile image
Vladimir

Python is multi-paradigm and Java is imperative OOP only. The biggest problem that at the moment pretty much every school teaches you how to write imperative code leaving the possibility to learn declarative functional programming to you with no help. I agree that for low level programming languages imperative code is reasonable and it is still good to know how memory gets allocated and Java doesn't give it. Picking up such language as python gives you freedom in choosing, which paradigm you want to stick with, or at least improving skills right from the beginning. Many developers don't want to learn FP nowadays because they spent years on learning only imperative programming and used it on their work so even mentioning FP makes them angry and dissatisfied.
So I think that C/C++ is still a must and python is a good choice for the next language.

Collapse
 
cappe987 profile image
Casper

How often do people actually write in functional style in Python though? OOP/imperative is still the first thing most Python programmers will learn.

Collapse
 
greyfade profile image
Charles Banas

More often than even they realize.

The moment you write your first generator expression, you've already discovered the power of a functional style.

Yes, they start out with OOP (in a rather Self-like style), but much of the language does, despite Guido van Rossom's poor understanding of it, in fact support strong functional style very well, and Python programmers learn it very early on.

Collapse
 
olvnikon profile image
Vladimir

Because imperative code is much closer to how human brain works. Line by line. FP is a bit difficult from the beginning because it forces to think in a different way. That's why it is always easier to start with imperative coding. However, if the tool also provides the possibility to write declarative code there is a chance developers try it. Java cuts this possibility making new developers OOP oriented only.

Thread Thread
 
cappe987 profile image
Casper

You've got a point. I totally agree that more people should learn FP. But learning declarative in an imperative-first language means that if you can't solve it in declarative there's a big chance you fall back into your comfort zone. If you are looking to learn declarative for educational purposes you're better off choosing an functional-first language. Programmers are expected to learn multiple languages eventually.

I'm not saying to not learn Python first. My point is that these so-called "multi-paradigm" languages are still very much focused on imperative (most of them at least), and choosing Python for the sake of it isn't a good reason.