4 ms·
Is there any language out there that improves on Python in various ways but still allows convenient access to literally the entirety of Python's ecosystem of li
by amelius 4y ago
Is there any language out there that improves on Python in various ways but still allows convenient access to literally the entirety of Python's ecosystem of libraries?
- bayesian_horse 4y agoCoconut, F# (Fable)... https://github.com/vindarel/languages-that-compile-to-python https://github.com/vindarel/languages-that-compile-to-python
- dunefox 4y agoF# is a great language... I wish I could use it at work.
- bayesian_horse 4y agoOne of the selling problems is that it can be hard to bring coworkers up to speed on it. Management don't like that kind of thing. What management like very much is that using F# attracts better talent, but they no can believe.
- dunefox 4y agoIt's actually very easy. If developers can't learn a slightly different language then they're getting paid too much.
- bayesian_horse 4y agoF# is a highly different language (at least from Python and Typescript) with additional concepts and I don't think you appreciate the problem for most companies to hire developers at all, let alone the kind of people who can hit a new language without a speed bump.
- dunefox 4y agoI would think any developer worth his salary can pick up a new language in a couple of months at most.
- qsort 4y agoHy: https://docs.hylang.org/en/stable/ https://docs.hylang.org/en/stable/ I tend to stick to vanilla python though, mainly because Hy is too much of an hassle for my use cases.
- DarkNova6 4y agoGraalVM myb?
- elcritch 4y agoI've come to really enjoy programming in Nim. Note that Nim is very different language despite sharing a similar syntax. However, I feel it keeps a lot of the "feel" of Python 2 days of being a fairly simple neat language but that lets you do things at compile time (like compile time duck typing). There's a good Python -> Nim bridge: https://github.com/yglukhov/nimpy https://github.com/yglukhov/nimpy
- lostmsu 4y agoAny .NET language with https://github.com/pythonnet/pythonnet https://github.com/pythonnet/pythonnet
- cb321 4y agoWhile I agree with the @elcritch reply (https://news.ycombinator.com/item?id=34616755 https://news.ycombinator.com/item?id=34616755) that Nim is just nicer overall, depending upon one's idea of "convenient access to literally the entirety", Cython may be more to your liking as mentioned else thread: https://news.ycombinator.com/item?id=34616052 https://news.ycombinator.com/item?id=34616052 While usually pitched as "only" a language for fast extension modules and/or bindings to existing C/C++ code, Cython is really a language in its own right. https://cython.org/ https://cython.org/ has some more details. It works by generating C code that calls the regular CPython API, managing all the ref count and tuple jazz that's rather a hassle to write in C directly. Then you run a C compiler against this code and it literally just links against the CPython .so's/DLLs. So, it's not just calling module code the same way as CPython, but actually calling the core built-in to Python code the same way as well. As you add more `cdef` type annotations to your cython code, the generated C code becomes closer & closer to hand-written C code (both in hazards and efficiency). Of course, a caveat is that may be Cython also doesn't improve upon Python very much as a language, except for allowing gradual static typing.
- sundarurfriend 4y agoPythonCall [1] and PyCall [2] provide pretty convenient ways to interoperate with Python from the Julia language. It has great package/environment management, excellent (potentially close-to-C) performance, automatic type inference, and a good set of interactive tools that make for a rich REPL. But any such FFI (from any language) is an additional point-of-failure, an extra gear that could break and has to be maintained. And on the con side of Julia, there's an initial compilation time (which is improving version to version, but still a factor to consider). Also it should be mentioned that the advantage of Python is not only its ecosystem of libraries, but also the vast array of tutorials and learning resources, and of development tools. Those are areas where most other languages have to play catch-up with Python, especially a relative newcomer like Julia. [1] https://github.com/cjdoris/PythonCall.jl https://github.com/cjdoris/PythonCall.jl [2] https://github.com/JuliaPy/PyCall.jl/ https://github.com/JuliaPy/PyCall.jl/