4 ms·
Have you considered Kotlin and Graal? It's obviously not Python, but Kotlin feels syntactically like Python meets Java, and since it compiles to byte code, you
by dehrmann 6y ago
Have you considered Kotlin and Graal? It's obviously not Python, but Kotlin feels syntactically like Python meets Java, and since it compiles to byte code, you can do AoT compilation in Graal.
Edit: apparently GraalPython is a thing.
- crazypython 6y agoSyntactically, sure. But D is semantically a better combination of Python and Java. With `mixin`, you can `eval` arbitrary strings at compile time. You can call methods and use variables that are dynamically generated, like Python's `__getitem__` with D's `opDispatch`. You can generate code based on names and member variables using D's traits. You can use Python-like refcounting with `RefCounted!`. You can use Python's generators/iterators using D's lazy ranges, which are just as fast as manual for loops.[0] You can bind to Python with little effort using PyD. Just like Python, D has great C interop. D compiles quickly and has much nicer syntax than C or C++. [0]: https://forum.dlang.org/post/xbejngbluilrulstmmhu@forum.dlang.org https://forum.dlang.org/post/xbejngbluilrulstmmhu@forum.dlan...
- pjmlp 6y agoThere a new book about D for Python programmers. "D, the Best Programming Language, for Former Python Developers: (Learn D Programming for Python Developers)" https://www.amazon.com/Programming-Language-Former-Python-Developers-ebook/dp/B08MD7ZB2X https://www.amazon.com/Programming-Language-Former-Python-De...
- amelius 6y agoThe main benefit of Python is the ecosystem.
- heavyset_go 6y agoKotlin Native also compiles to platform binaries.
- pjmlp 6y agoKotlin Native is going through a reboot after they realised making a memory model incompatible with JVM semantics wasn't that great idea after all. Who would have guessed....
- heavyset_go 6y agoHave any links so that I can read up on this? I found this from last July[1]. [1] https://blog.jetbrains.com/kotlin/2020/07/kotlin-native-memory-management-roadmap/ https://blog.jetbrains.com/kotlin/2020/07/kotlin-native-memo...
- pjmlp 6y ago"Why the Kotlin/Native memory model cannot hold." https://itnext.io/why-the-kotlin-native-memory-model-cannot-hold-ae1631d80cf6 https://itnext.io/why-the-kotlin-native-memory-model-cannot-...
- heavyset_go 6y agoThanks
- TylerE 6y agoNim seems like a much more compelling alternative. It generally feels pretty pythonic (At least as much as anything typed can), and it certainly scratches the "compiles to efficient machine code with no dependencies" itch.
- master_korin 6y agoIt's surprising that there's only one comment on Nim. There are connectors to run Nim as a Python extension or run Python inside Nim.