I am not sure if it has something to do with age. But I found both Kotlin and Swift share pretty much the same thing. Over Complexity. Objective C and Java works.
I am also wondering if Meta still uses PHP or Hack.
> I am also wondering if Meta still uses PHP or Hack
Meta’s WWW codebase is its oldest, and still written in Hacklang. Lots of internal tooling is also written in Hack.
I wouldn’t be surprised if there are more committed lines of Hacklang than any other language (although, a good chunk of that is codegen, vs other core languages where codegen is part of the build process).
I never worked with Kotlin, but have kept it in the back of my head as the simpler alternative to Java if I had to target the JVM. What makes it more complex?
Disclaimer. Last time I seriously used Java, I was using Java 8, and I've only used Kotlin for screwing around with Android development on my own time. So what follows might be way off.
Kotlin provides a lot of 'clever' syntactic sugar and features that makes certain things that are quite verbose in Java, nice and compact in Kotlin. It also means that there are many way to achieve the same thing in Kotlin. Once you've learned everything it allows you to do things that would take a lot of Java in much fewer lines of code. But there is also just more 'stuff' to learn in the Kotlin language.
Java is a much simpler language than Kotlin with relatively few features, but this simplicity means you sometimes have to build quite verbose structures to achieve what you want.
So which is 'simpler' very much comes down to how you define 'simple'.
Since then, Java has incorporated a lot of the syntactic sugar from Kotlin. Not all of it; they're still very judicious about trying to keep the language tight. But things like the lambda features have even made it down into the JVM (which is actually incredibly stable).
Kotlin's one big advantage is having avoided the "billion dollar mistake" of null pointers. Or at least, mitigated it. But in my opinion it's not sufficient to install a whole new language into your stack.
Oh I see, so this is kind of like with Ruby, where people build a lot of magic that looks simple but hides complexity that you still need to understand.
Additionally, the above-linked JEP only proposes to make a small subset of types potentially null-safe. The goal there is performance, not correctness.
I am not sure if it has something to do with age. But I found both Kotlin and Swift share pretty much the same thing. Over Complexity. Objective C and Java works.
I am also wondering if Meta still uses PHP or Hack.
> I am also wondering if Meta still uses PHP or Hack
Meta’s WWW codebase is its oldest, and still written in Hacklang. Lots of internal tooling is also written in Hack.
I wouldn’t be surprised if there are more committed lines of Hacklang than any other language (although, a good chunk of that is codegen, vs other core languages where codegen is part of the build process).
Why don't they do codegen at build time in Hack?
I never worked with Kotlin, but have kept it in the back of my head as the simpler alternative to Java if I had to target the JVM. What makes it more complex?
Disclaimer. Last time I seriously used Java, I was using Java 8, and I've only used Kotlin for screwing around with Android development on my own time. So what follows might be way off.
Kotlin provides a lot of 'clever' syntactic sugar and features that makes certain things that are quite verbose in Java, nice and compact in Kotlin. It also means that there are many way to achieve the same thing in Kotlin. Once you've learned everything it allows you to do things that would take a lot of Java in much fewer lines of code. But there is also just more 'stuff' to learn in the Kotlin language.
Java is a much simpler language than Kotlin with relatively few features, but this simplicity means you sometimes have to build quite verbose structures to achieve what you want.
So which is 'simpler' very much comes down to how you define 'simple'.
Since then, Java has incorporated a lot of the syntactic sugar from Kotlin. Not all of it; they're still very judicious about trying to keep the language tight. But things like the lambda features have even made it down into the JVM (which is actually incredibly stable).
Kotlin's one big advantage is having avoided the "billion dollar mistake" of null pointers. Or at least, mitigated it. But in my opinion it's not sufficient to install a whole new language into your stack.
Oh I see, so this is kind of like with Ruby, where people build a lot of magic that looks simple but hides complexity that you still need to understand.
I really miss Kotlin's null safety in Java
I prefer Scala's Option over Kotlin's nulls.
I really miss Java’s exception safety in Kotlin.
If Java ever ships Valhalla we might get null restricted types: https://openjdk.org/jeps/8316779
Note that you can get null safety in Java today from third-party static analysis tools: https://jspecify.dev/docs/whether/#nullness-checker-support-...
Additionally, the above-linked JEP only proposes to make a small subset of types potentially null-safe. The goal there is performance, not correctness.
Kotlin is awesome, good on Meta.