4 ms·
I work in a codebase that’s mostly kotlin and python and I’ve come to hate the python side. I used to love python, but I feel like the attempts to tack on typi
by parpfish 2y ago
I work in a codebase that’s mostly kotlin and python and I’ve come to hate the python side.
I used to love python, but I feel like the attempts to tack on typing have really undermined it.
The “freedom” of being untyped is nice for quick little scripting things, but being typed is an absolute godsend in a real codebase.
Instead of making python pseudo-typed with messy annotations, the scientific/research community should have built out tools in an actually typed language. I think Julia hung around for years with the expectation that people were going to do that
- bcye 2y agoWhat kind of codebase would be mostly a Kotlin/Python combo?
- yen223 2y agoKotlin Android app with a Python backend for ML stuff, maybe? Or maybe they're in one of those places that use microservices with a variety of languages
- mike_hearn 2y agoYes but it's reasonable that they didn't. For quick hacky scripts you really want a lightweight syntax that supports interactive REPL exploration. Kotlin is the first language that manages to combine a strict static type system with a Python-weight syntax, and there's a REPL too although I don't think it gets much use. These days notebooks are a better replacement for REPLs anyway when doing data analysis, but Kotlin only got support for such features very recently.
- hocuspocus 2y agoKotlin isn't the first language offering any of these features, not even remotely. Even if you look only at the JVM: Scala is much older.
- binkHN 2y agoI think the point is Kotlin incorporated great stuff from a few languages, Scala being one of them.
- hocuspocus 2y ago... which is the exact opposite of being "the first".
- mike_hearn 2y agoScala isn't "python weight" as it's much keener on obscure operators and other syntax sugar than Kotlin or Python.
- hocuspocus 2y agoWhat are the obscure methods in the standard library? Kotlin has grown into a much quirkier language overall, its grammar is significantly bigger than that of Scala.
- sn9 2y agoHaskell and SML are even older.