Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
31415098yAre NullPointerExceptions really such a big problem? I have worked with Java (not for Android) for quite some time now and I rarely ever see them. And even then, they are mostly caused by programming errors that would also have some other rather unpleasant side effects if left unfixed.
-
@3141 the difference between Java and kotlin is: in Java, everything is nullable by default, in Kotlin, it's not
You can avoid a lot of pitfalls with that
And yes: they're a problem. I even somehow managed to get one in a 60 lines number-guessing game -
Eariel19088yNo, they're saying it's now first class, as in "fully supported by Google" instead of just "community likes it and many examples of libraries are written in it". It doesn't mean Java is going bye bye in the immediate future, more like just "yo' dev, check it up, you might need it soon". I'm guessing it's also a "Oracle we hate you" banner.
-
31415098y@Krokoklemme Strange. Are those caused by your own code or some API? I cannot even remember when I last saw a NullPointerException in my code that wasn't caused by some stupid mistake like forgetting to uncomment some code.
-
Java dev for almost 3 years, i had a nullptr ONCE when i didnt serialize an object
-
Koolstr27908yAm I able to build an Android app purely off of Kotlin now, or do I still need to learn through the Android Java syntax? I've been coding in Java for over half a decade but I don't want to have to learn both for Android if I don't have to anymore.
-
The language is more concise with plenty of modern features. The null pointer isn't a real problem, I have been using @Nonnull annotation to highlight when I'm being stupid. And you really should have unit tests which means you won't have NEP in production.
Though I like the first class support of Kotlin and will be using it in the future, I am quite confused as to why Anroid devs like it so much compared to say Sacala or any other jvm langs. Scala has been around and has provided everything Kotlin has for mych longer, so why Kotlin ... -
@rusty-hacker yeah Scala is good for android but you see the jetbrains company that made the IDE and android studio are responsible for Kotlin. Hence the extensive support whereas for Scala it is done by volunteers.
-
Guys, I'm not impling that while writing every java program we hit null pointer exceptions. While working at Firefox for android I hit many null pointer exception. I know I might not have​ followed proper Java code writing style. Java is verbose and due to most people using Ruby like languages which is very readable and less verbose lots of things are done and programming is better. To be better for developers Apple introduced Swift which is better than objective-c and same is happening for Android. Modern language is needed for modern times.
Related Rants
Yahoo, Kotlin is the first class language for android. So no more fucking Java codes. No more 100 lines for basic configurations. No more null pointer exceptions.
Only beautiful code and fun.
undefined
kotlin
android
java