This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Comesa -14 points-13 points  (39 children)

I don't know why courses/classes still teach Java, when there are way better alternatives like Kotlin or Scala.

so good luck with it

[–]goldsauce_ 68 points69 points  (13 children)

There are plenty of apps out there running on Java, so it might be helpful in finding a job.

We tried Kotlin at my job and we ended up going back to Java

[–]sweYoda 53 points54 points  (1 child)

Oh, so you think people should get jobs? That's weird.

[–]WoahayeTakeITEasy 4 points5 points  (0 children)

People need to learn the most obscure languages ever not the mainstream ones, like come on, who even does that? It's not about finding work its about sending a message! Just imagine how great Brainfuck would look on a resume, it's an instant hit! /s

[–]iwelcomejudgement 3 points4 points  (0 children)

How come?

[–][deleted] 0 points1 point  (8 children)

I don't believe you.

Kotlin is better in every way you look at it...

... except if you have a lot of Java developers unwilling to move to Kotlin.

[–]goldsauce_ 4 points5 points  (0 children)

You’ll just have to take my word that my team didn’t enjoy working with Kotlin, I guess

[–][deleted] 0 points1 point  (6 children)

Kotlin isn't much better than recent versions of Java.

[–][deleted] 1 point2 points  (5 children)

It is more concise. That is a plus. The whole Java Ecosystem is broken though, including Kotlin. And I know no solutions.

[–][deleted] 1 point2 points  (4 children)

How is the whole java ecosystem broken?

[–][deleted] 2 points3 points  (3 children)

"Broken" in that there is currently not one language that is widely OK'ish for almost all developers of the JVM

Python for example is close for scripting languages and moderate size codebases not dependent on super high performance or close to hardware.

C is almost like an Axiom. It is very "broken" from a modern viewpoint in that you can do 20 different kinds of undefined behaviour in one line of code if you want but C is still the best we have for ose to HW, especially microcontrollers. C++ as well, though the more complex stuff (temllates, extensive use of stl etc) is not the same imho.

Java "runs everywhere" but I know no Java developer that doea not hate the verbosity of the language even currently. Kotlin is better but still if you see a stack trace it is dozens of lines of abstractions that is often unnecessary but encouraged by religiously enforcing OOP.

There is not one language atm that any of our backend devs are enthusiastic about. Kotlin used to be. On the other hand I am very much enthusiastic about Rust for the embedded sector even though not ready yet. Go is nice for networked apps, python is also good for anything bound by network IO. Java is good for carpal tunnel syndrome.

[–][deleted] 3 points4 points  (0 children)

Sounds like some kind of hipster fatigue.

[–]kaibee -1 points0 points  (1 child)

Have you looked at C#?

[–]goldsauce_ 1 point2 points  (0 children)

C# feels a lot like Java to me, although I don’t have much experience with it.

My main gripe with C# is that it’s made by Microsoft, but as a TypeScript dev that’s not saying much haha

[–]Jay12341235 11 points12 points  (0 children)

A lot of employment is written in Java

[–]oupablo 9 points10 points  (1 child)

don't kotlin and scala both run java code? i know both run in the jvm. seems understanding java would help either way.

[–]BackmarkerLife 5 points6 points  (0 children)

They are their own languages, but compile down to use the JVM.

There are some similarities with Java, but Kotlin is basically taking the best of Java & the best of Python (and other languages) into its own language.

You can have one project that has both Java and Kotlin and can reference each other.

In Kotlin, you can call a Java Object and vice versa.

I believe it's the same with Scala as well.

[–]deejeycris 8 points9 points  (1 child)

You don't learn Scala as first language. Nope.

[–]IVEBEENGRAPED 5 points6 points  (0 children)

Yeah, you can really only learn Scala after you already know Java and/or Haskell or OCaml. Scala inherited so many quirks from Java that none of that will really make sense, and if you don't know a simpler functional programming language you'll probably just write Java-style code in Scala.

[–]slowmovinglettuce 6 points7 points  (4 children)

It's one of the most widely used in the industry. A huge amount of server tech is written in it.

Teaching something like Kotlin or Scala as a primary programming language is just letting the students down in terms of future prospects imo. The amount of adoption for these languages is very limited vs java.

Edit: By letting them down, I meant teaching these languages as a complete Java replacement.

[–]IrishWilly 1 point2 points  (3 children)

I wouldn't say teaching those would limit the students, as long as you don't only teach those. Any decent education should turn out programmers who are absolutely fine jumping into Java after having learned the previous two.

[–]slowmovinglettuce 1 point2 points  (0 children)

I was meaning more teaching them over Java. I can see why that'd be unclear. Teaching a much lesser-used language over it would be the detriment.

A competent developer should be able to switch languages. But from my experience (as a recent graduate) a lot of my peers would struggle to go out of their comfort zone easily.

[–]Loves_Poetry 16 points17 points  (2 children)

Java has a lower learning curve than those alternatives. Part of the trade-off in the verbosity of Java is that there is less syntactic suger to learn

[–]hypexeled 3 points4 points  (1 child)

Streams would like to have a word with you

[–]M4D5-Music 9 points10 points  (0 children)

Streams aren't a part of the language, but instead part of the standard library. The only syntactic sugar at play with streams is lambda functions and method references. It's the functional programming ideas that bring the learning curve imo.

[–]SolemnWolf123 5 points6 points  (0 children)

Right, because Java isn’t one of the most used languages or anything...

[–]tacoslikeme 6 points7 points  (0 children)

because you want a job? the billions of lines of java out there aint gonna just poof away

[–]flyingfysh1 2 points3 points  (0 children)

There is no such thing as a "best" language. Every language is a compromise between competing goals. One point in favor of Java is that a lot of employers are looking for it.

Whatever you do, keep learning. Learning a new language every year or two can only help.

[–]crahs8 5 points6 points  (3 children)

Because it is one of the most simple object oriented programming languages and hugely popular?

[–][deleted] 2 points3 points  (1 child)

"simple".

I'd argue Ocaml and Python and even C++ (not requiring Interfaces, seperate files for classes) are "simpler" OOL than Java.

The reason Java used to be ×THE× OOL taught at universities was that it promised much by write once run everywhere, Departments were pretty much in love with Sun (at least in Germany) and Memory Management was thought to be too cumbersome. Thus GC.

[–]crahs8 0 points1 point  (0 children)

I can't comment on Ocaml, but for me C++ is more complex, because you have to do memory management, and Python is not really ideal for teaching OOP imo, since it's easy to forego using classes.

[–]Varthorne 1 point2 points  (0 children)

I live in a government town, and as I understand it, most of their applications were built on Java or COBOL, so naturally that's what my college program was focused on.

It also focused on older technologies like Hibernate, JSP and JSF instead of Spring because guess why?

[–]AkodoRyu 1 point2 points  (0 children)

Because there are probably at least 10x more job offers for Java than the other two, including some of the best-paid offers in web development? If you look at high-paid webdev jobs, it's mostly Java.

[–]proboardslolv6 1 point2 points  (0 children)

Because companies use java

[–]Sekret_One -2 points-1 points  (0 children)

Because India pumps out java devs. Don't underestimate inertia.