3 ms·
steep learning curve does seem laughable. If you know Java, you can be start writing kotlin after a couple of hours with the kotlin koans. My main pain point
by on_and_off 8y ago
steep learning curve does seem laughable.
If you know Java, you can be start writing kotlin after a couple of hours with the kotlin koans.
My main pain point with kotlin is that I generally have a good idea of how my code will look like as bytecode (like this feature will need an intermediate object, so let's use this instead in this very big loop). In kotlin, it is a bit more of an uncharted territory, even with the fantastic 'see bytecode' tool.
- eropple 8y agoI've had the same complaint before, for sure--when writing very perf-conscious, GC-sensitive stuff I still might hop over to Java because I do understand its exact behaviors a little better. But, as you mentioned, the bytecode viewer helps a lot.
- on_and_off 8y agoI should have mentioned that in both cases, it is a bit of a pipe dream to think you can envision what the compiler will churn out. Especially with one that is constantly evolving like kotlinc. Some of the bad practices of 5 years ago have devolved into cargo cults and the compiler can actually handle these cases fine now. So I guess that this is not that great of a reason to choose either Java or Kotlin. In both cases, if performances are critical and lacking, you will have to whip out systrace and look at the bytecode.