@Jappleng I understand where you're coming from, and I have less experience than you (still quite a bit though, Java has been my main programming language for a few years now), but I think you're underestimating Kotlin. While Java's syntax is certainly familiar, it's very rigid and repetitive. Kotlin implements more modern syntax features that deviate from the traditional c-style, and tbh I kinda dig it. Ofc both languages compile to the same bytecode so this isn't really a huge deal, plus any library written in Kotlin is backwards compatible with Java and vice versa, so like you said it's really just a preference thing. Android development certainly is comically messy though lol, and Google's lack of any semblance of support for developers is downright astonishing.
@Jappleng I think what they ment by unsecure and secure is that In java, public variable are unsecured and it's why we just do a private variable with getter and setter, it makes it safe In Kotlin however, a public variable is in reality a java private variable with getter and setter included, this is safer since you can never have unsecure public values (also no identifier just turns it public by default) Kotlin's protected changes the variable's getter/setter method to be protected and private just creates none So Java is safe, Kotlin is safer, that's what they ment, but this channel seems like they know nothing since they showed an XML file instead of Java code which is idiotic cause Kotlin would also use the very same XML file
@@lewisayers5983 or you could also use your IDE's shortcut as all the programmers do and autogenerate getters and setters pressing 2 bottons in 1 ms...
-you can extend a class funtionality in Java. -the code isn't complex or longer from using getter or setters. That's encapsulation, and you can do it in Kotlin too. It's not a language feature but a methodology of OOP. -then It rants about java being verbose and longer for writting than Kotlin. but shows a manifest xml file. That you also would have to use in Kotlin.
"you can extend a class functionality in Java" You can only create static functions or subclasses in Java. With Kotlin you can write extension functions directly on an existing class, which comes in handy in numerous places where subclassing would be cumbersome (perhaps special functionality on the Android TextView). The last point about the verbosity is true. I caught that in the video too and when I saw XML it gave me a good laugh.
He also mention verbosity which actually turns out to be healthier for my brain than I expected. He also mention performance, like, is Java slower than Kotlin?
The fight between Google and Oracle, and especially Google's ego towards Oracle has led to slow adoption of new Java LTS versions in Android. If JDK 17 is done today, it will be awesome to write Java code. As regards to KOTLIN, I am Java developer, I love Java programming very much. And I am learning Kotlin for quite few weeks. I think rather than Java vs Kotlin, Java + Kotlin is really damn powerful than any combo. The best of both worlds in every project is a guarantee of success. Also, I am liking Kotlin and its style of writing code. But not at the cost of Java, but alongside Java. I would say a Java developer should learn Kotlin, and vice-versa. It will give them the most powerful tools to write and develop.
Absolutely! Learning both Java and Kotlin gives you a powerful toolkit for development. Their combination offers the best of both worlds, enhancing flexibility and efficiency in projects. Happy coding!
I've done many languages and when he said "Java is easy to learn", I almost had a heart attack.....I some how pick other languages so fast...but java, NO
Started with python for a few weeks, until i heard about java really hard and whatever And when i got my hand on java Im shocked, cuz in my eyes java is just a python with longer syntax
Great video! It's interesting with how far behind Android is when it comes to Java. Only just recently had it supported JDK 11. This is probably another reason as to why Kotlin is preferred by Google. It provides more powerful language features SOONER than Java even though later versions of Java now support similar things (lambdas for example).
Less code is always better, and anything missing from a new language is usually implemented over time. I really hope Kotlin removes the Javascape from existence for anything but legacy.
4:48 "Data Class" is a "smell code" (Martin Fowler - Refactoring), it produces a non-cohesive class. Both exaples "smells" but i see a pro in java, if the "smell code" is textual you can recognize it better. Also, i think the type sistem is your friend. Gives you control and security in your desing and development process. :)
for those complaining, java is really easy to learn, you learn about OOP and advanced concepts in a really easy and high level way. if you start with somethig like python it'll be harder to learn other languages and you'll lack many things
Kotilin is just child of legal issues between Oracle and Google and Java source code. I don't see any benefits using Kotlin over Java. Maybe some things u can write in less code. Compose is disaster for complex ui. (My personal experience)
Yes, pretty easy. Compare to C/C++ where Java was inspired from! C/C++ has pointers (Java doesnt), multiple inheritance (Java doesnt), lack of dynamic memory allocation (Java doesnt), lack of automatic garbage collector (Java doesnt)... And you say that Java isnt easy?! C'mon!
Good day👋! If you use Kotlin with JVM as a target to run applications, then yes. But Kotlin can be used to write programs with compiling to JavaScript or Native. And these cases ver different from JVM target
Great video! Would help to explain the usual pronunciation of words in the context of code (e.g. "record", which was pronounced like in "I'll _record_ something" instead of like in "a music _record_"). I think saying it in the correct way makes developers feel more at home. Edit: Just by looking at your content both here and your page anyone can see the attention to every detail, great job! Slava Ukraini
I'd be surprised if the speaker isn't just reading from a script and has any idea of what he's talking about. They'll often say a simple word when it would have been an easy place to elaborate on what it means, e.g. "in Kotlin, it's a lot easier" 🔚, "that is coroutines" 🔚. Or they emphasize the wrong word: "it *is* considered an object". Or pronounce the word wrong like how they said "inference" like "interference" just without the "ter"
Definitely give Kotlin a try. I'm having fun learning Kotlin on JetBrains (the developer behind Kotlin) as my first programming language and about to complete my third project in less than a month in. I tried to learn C++ and Java in the past and struggled.
//code conciseness public class Person { //"plain old data" version of Person public String name; //make everything public because OOP introduces tradeoffs for zero gain public int age; //original uses string type for age for who knows what reason, maybe only kotlin has an int type? }
One of the biggest eCommerce in Europe is written mostly in Kotlin nad Java. ( about 1000 microservices in Kotlin ) JIT can optimize Java code much better than static compilers
Java is very good to build up OOP knowledge (don't blame NPE, that means your design has flaws), Kotlin has some handy features (like coroutines and data class as mentioned in the video), that is fun to write but confusing to read sometimes.
Lol we all know that NPE is a developers mistake but it is called a million dollar mistake for a reason if Kotlin can solve this thing to an extent by giving compile time errors then it's a win situation for the developers . Plus your comment sounds idiotic when you are saying Kotlin is confusing in terms of readability. Kotlin is not confusing it's you who are struck with java long syntax that you can't understand the readability and conciseness of Kotlin Syntax. The Kotlin code is clean and readable at the same time...
Java is far more better then kotlin. Google just made kotlin as official language because of the partnership with jetbrain (Inventor of kotlin and Android studio)
Java supports RECORDS. Just because Android doesn't support java RECORD and Kotlin automatically generates the boilerplate code, is it a problem of Java or Android? And since Android ecosystem is a Google's child, same as the choice of Kotlin being default language in AndoridStudio, then doesn't it look like there is artificial fight with java by not implementing the higher versions and features of java properly? Someone wants to have monopol over the whole Android, and that's where kotlin kicks in. Java is also very concise, especially newer versions. You say java java don't have automatic type inference, well maybe on Android it is another feature that is fighted with, but java has "var" since long time now, funny that in 2022 you still enumerate it as a Kotlin advantage over java. And you said that java is not secure, and that Kotlin can laverage the libraries of java becuases uses JVM - this implies that Kotlin can't be more secure than java. And the point about java allowing "null", well, to me it is very unwise to point this as any advantage or disadvantage of one language over another - this whole "null" thing is artficial problem of people not understanding the languge, the null thing can't really be reasonably opted out, every solution to this introduces additional level of complication, because in Object Oriented programming the concept that the referenced object is not existing which is the concept of "null" is like the concept of "zero" in math is part of the world, and so we should have Optional for zero, because dividing by 0 can cause RuntimeException? No, imagine the readablity of code checking before every divison - that would be a mess and a bugs cradle - the program needs to be designed that where there can't be zero, there is no zero, and where there can't be null, there is no null, the programmer is responsible (proper code, proper tests, documentation etc...). In java you have the Optional type where you can return some object instead of null, but I never saw a scientifically conducted examination stating that the lack of null in language is better than having it, especially to prove that it improves code readability, lowers the bugs rate etc, actually what I've found is the the more complex the code, the more fancy ideas there is more bugs, and that's it. KISS
You never wrote something in Kotlin. You didnt understood the null concept of kotlin. Why do write a wall of opponion to something you dont understand?
@@Krzys6301 Flatearthers also have their own opinion. I had an argument and its all needed. You didnt understand the null concept in Kotlin. You even dont know that there is also null in Kotlin. Therefore, all of your "opinion" is wrong, because its based on untruth.
@@Jelvix Ye I learned Kotlin cause I felt like making minecraft mods in another language to be honest. Thanks to ShadowFacts, that's possible using their API.