Java is too old, What should you learn in 2018?
Java has become legacy. It canβt evolve in to a modern language while keeping its back...
For further actions, you may consider blocking this person and/or reporting abuse
What task are you solving? Yes, Kotlin is fresh and new and superawesome. But Java is as well. Performance-wise it is the same as both compile to JVM.
For me there are no big improvements to move from Java to Kotlin. I prefer the more verbose way Java is doing things.
I tried to get used to Kotlin but it has a steep learning curve.
It really depends on the task that defines the toolkit being used to solve the problem.
Additionally, I feel like a lot of the issues mentioned are already solved in new versions of Java
Steep learning curve?
That was not my experience.
You should be able to get starting quite easily by git cloning the Kotlin Koans and fixing the unit tests in Intellij
github.com/Kotlin/kotlin-koans
Can't agree more, it really varies and depends. I prefer to stick to Java if it doesn't make too much difference
this article is such a fanboi teenage view on languages, and especially java )
besides the fact that java evolves and evolve other platforms, it actually has local variable type inference, so comparison is outdated at its best. I urge you to take a closer look at Kotlinβs origins too, which is owners of JetBrains, that claimed in one of their interviews, that they would take full advantage of owning both language and IDE to make a perfect blend - might turn out to be a biased platform.
PS and yes if you havenβt heard of Lombok for java - donβt thank me, its way much more powerful than built-in Kotlin data-class ))
Although I find fanboy teenage view a bit harsh to say, I have to agree here.
Java is actually very mature and got lots of new features in the past years.
All the same has been said about Scala when it was released and it was hyped. I actually liked it because it had some nice features borrowed from Erlang. Nevertheless, it didnβt get mainstream as Java is.
And Lombok actually pretty handy. Have a look at my article about modern software development in Java.
So, I wouldnβt burn all the Java books yet. Itβs always good to have a look at new languages, even learn those languages but Iβm still skeptic about if it will at some point in time take over the role that Java has right now.
Lombok is great, but the downside is that it is not part of the language. It's a separate project with it's own bugs and issues (especially compatibility) and you neef to enforce it's usage by IDE or Maven plugins (separate projects with their own issues and bugs).
Local variabled btw will be available in Java 11, which is still not releasef yet.
Java 11 has been released on 25. September 2018...
Ah! I thought it was scheduled for October. My bad! I bet everyone is on Java 11 by now.
That's one feature, and it's only in Java 10.
Before that is available in, let say Android, we will all be dead.
What I read from this is they have both the skills and the means to provide both a good language and good tooling support, but feel entitled to have your own opinion :)
Exactly! I've been checking comparisons Java vs Kotlin for the past months and I always feel like they are comparing it to Java 6-7
While I was scrolling I was 99% sure you would have said something :D
Coming back to βlanguageβ as a metaphor, Kotlin might allow you to build concise sentences, but does not mean that it therefore allows you to better express yourself, and it does present you with a lot more cognitive load. Thatβs not to say Kotlin doesnβt have its merrits, but itβs a bit annoying that usually only the merrits are mentioned.
To me concise code always reduces the cognitive load especially during reading. You make an interesting point, but an example would help to better understand.
For e.g a code that is more concise in Kotlin but requires more cognitive load and same thing implemented in another language which is very expressive with a less cognitive load.
The only thing that really reduces cognitive load is less logic, while 'concise' very often tends to be an alias for 'dense', which is perhaps fun to write but terrible when it comes to maintainability. As to an example, Kotlin builds on top of java (bytecode) and as such adds concepts, which in turn add cognitive load, unless the new concepts can entirely replace more complicated old concepts (a good example of that is fat arrow functions in JS, which avoid the 'this' confusion).
As a very easy example of how extended vocabulary only adds cognitive load, I'm going to going to borrow from Ruby (sorry, guys): array.second requires you to know about and keep in mind the different variations that exist (and don't exist) in this form, while array[x] can do exactly the same at a fraction of the vocabulary.
I do agree that extra vocabulary can be beneficial, but legion people have a proclivity to extol the efficacy and delectableness of a prodigious and uncurbed patois ... at the cost of clear and straightforward language. If you know what I mean :).
edit: since I forgot to specifically answer the following
keep in mind that it's not just a matter of implementing with less code. It also relates to having to know about the syntax concepts. There are a fair number of languages that can be very expressive indeed, if you know lots of the concepts of that language (a monad is a monoid in the category of endofunctors, and so on and so forth).
Alain be like /r/iamverysmart
If that's what you got from that purposely difficult sentence then great. But using a thesaurus works just as well though ;)
+1 on this. It all depends on the task to solve.
It might also depend on what you're trying to do. If you're trying to get a job on company (in your area) that uses Java (and you happen to like Java and the company) then go with Java. If you're trying to break into the consulting gig and there's lots of Kotlin jobs, then learn Kotlin ... substitute Kotlin and/or Java for whatever language applies. At the speed of how the tech world changes, I think there's certain advantage to being language agnostic. Each of these languages reached widespread adoption for a reason
Java and JVM is no longer needed to be honest. Web works just better without Java. I don't know about legacy projects. But my apps won't be running on java be it desktop or mobile. I just want to get rid of that dinosaurs. Same with .Net. It's too much for little projects.
Little projects? As a .Net developer who has developed for some of the major financial institutions in the world I can assure you .Net is still very much at the top of the list.
JVM platform has a lot of top-shelf language choices.
Java is a lot like C#. Java is longer in the tooth, and its stewards have been much less attentive compared to the stewards of C#.
Kotlin is a lot like Swift. However, the one downside to Kotlin in the JVM ecosystem is the developer still has to be aware of the Java peccadillos or be puzzled by otherwise surprising behavior. (Analogously, Swift devs still need to have some familiarity with Objective-C to understand some of Cocoa's peculiarities in a Swift world.)
Clojure is Lisp with Functional Programming added in. If you like Lisp, I'd think you'd find Clojure to be the perfect choice for JVM. I'm not sufficiently familiar with Clojure to contrast it to super-focused functional programming language Haskell, or "FP first" functional programming language F#. I am sufficiently versed in Lisp and Scheme to have due respect for the top-of-the-food-chain languages in which Clojure belongs.
Scala is an object-oriented language seasoned with functional programming. (For those Scala fans that may find my description to be flipflopped, I suggest you take a few months to learn Haskell or F#.)
Groovy is a kinder-gentler-friendly less fussy syntax flavor of Java. Groovy is to Java, as CoffeeScript is to JavaScript. However, the creator of Groovy jumped ship as soon as he saw Scala... so if you are leaning towards Groovy, you may want to seriously test the Scala waters before committing to Groovy. (In .NET land, Boo! is analogous to Groovy... except Groovy is a top-shelve JVM language, whereas .NET only has three top-shelf languages: VB.NET, C#, and F#.)
If you want to learn to program, good to start in a language that's good for learning to program (felienne.com has quite some resources on that).
I'd agree with @tuxOr to try out different languages, not just depending on the task you want to solve, but also to broaden your point of view.
Use Kotlin, because compiling Java doesn't take enough time already.