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
-
-
@irene first of in javascript you dont have "val", you dont have typed variables (" : Float")
-
@Emphiliis i wouldnt call it a lot but yes it does have more similarities to typescript. But I think even more like Go (I dont know that so im not 100%sure)
-
@irene It is Kotlin... but we write all the new features in Java because this is the only time I've seen him use types... and the code is spaghetti and there are functions like:
fun getUserGender() : String {
val result = getUser().gender
return result
}
fun getUser() : User {
val result = readUser().user
return result
}
fun readUser() : UserModel {
val result = Realm.getDefaultInstance().where(User::java.class).findFirst()
return result
}
...and so on -
@irene yeah... that's what you get when a product manager tries to make an Android app
-
@vlatkozelka Because the non-profit advertised for a Java developer when I came for the interview and there was not a single word about Kotlin during the interview... and also because the unpaid(beneficial work... we are working on an app to help very sick children) senior developer/project manager who is helping me and giving me tasks also does not know Kotlin and is working a part time job in a big company that runs a search engine and is doing big data in Java for them.
Edit: Also, I hate Kotlin... val is a constant, var is a variable, there is no ternary operator, the code is pretty much unreadable with big chunks of it being generated at build time, it is never clear what type a variable/constant is and override is a freaking keyword -
@vlatkozelka In the end, considering a language “readable” is very opinionated. e.g. i think Python is very unreadable but many, many people disagree with me. Same with Go, i think it’s very readable like many people do but some colleagues strongly disagree with me on that. In the end, i think it’s personal preference :)
-
@vlatkozelka I was not talking about immutability, I was talking about it being named "val" when there is also "var".
Ternary operator is perfectly readable, you can read it as: is something true ? I guess so : I don't think so
It works perfectly fine if you maintain the standard line length.
Yes, I love the verbosity of Java, you can just look at something and immediately tell exactly what type it is or what type it returns, wether you need to make an instance of the object/class first and from where you can call it.
For me reading code written in Java is like reading a book, I am not able to do that with any other language... despite working with other languages far more often than with Java
And yes, having override as a keyword really bugs me. It is an annotation and it should stay that way -
@vlatkozelka oh, and about the generated code, half of the code of the app is generated from annotations and JSON... like wtf... people can't even be bothered to write a few lines of code nowadays
Related Rants
We are taking over an Android application source code from an external company to continue development in-house...
I present to you floateger:
(one of many crimes the previous developer has commited)
rant
float?
why not both!
integer?