4 ms·
As a current python & rust user, I can say that I picked up rust because I liked the idea of a systems language that could give me c-like performance, without h
by untothebreach 11y ago
As a current python & rust user, I can say that I picked up rust because I liked the idea of a systems language that could give me c-like performance, without having to use C. Rust seems, to me, like a combination of the best parts of python (traits as pseudo-duck-typing), haskell (type inference, functional concepts), and C(++) (speed, no GC).
As @mitsuhiko says in the article, it is very easy to export symbols from a Rust library so that they can be used via CFFI, so the possibility of "dropping down to Rust" instead of "dropping down to C" is very attractive to me.
- Cyph0n 11y agoI have my eyes on Rust, mainly for no GC and its ownership system, and Nim for its clean, Python-like syntax but with C performance. I also have Julia in my mind for my next scientific computing (image processing, DSP) project.
- untothebreach 11y agoI keep on messing around with Julia, but I never stick with it. I have nothing in particular against the language, but I don't do a lot of scientific computing, so my motivations to use it are not that great.
- juliangregorian 11y agoI think Julia gets unfairly pigeonholed. It's got a great concurrency story, for example. I know what you mean though, it always seems to be the language I'll write my "next" project in.
- Lofkin 11y agoWhy can't it be used for general computing?
- Fede_V 11y agoIt can. However, Julia made a very strong push to target the scientific computing niche (very strong array support, ease of writing tight loops in native code, etc) - and such it has a very quickly growing ecosystem of high quality scientific packages. In comparison, Julia has relatively few web frameworks, GUI toolkits, etc..
- untothebreach 11y agoSure it can. But why would I pick it up over, say, rust? Rust gives me the productivity of a dynamic language, and the speed of a systems language. Julia gives the same. So, given similar pros/cons, the choice comes down to aethsetics, and Julia just didn't give me a compelling enough reason to switch.
- the_mitsuhiko 11y agoThe main problem with nim is that you can't really pair it with Python whereas you can have Rust and Python call each other if you want.
- Siecje 11y agoCan you expand on why that is?
- untothebreach 11y agoJust a guess, but it is probably because they each have their own GCs, and that makes it harder* to ensure that objects created in language A, from language B, haven't been collected when language B needs them again. * harder, but not impossible
- the_mitsuhiko 11y agoNim requires a runtime to operate. Figuring out how to safely share the runtime between different Python extensions requires the cooperation of all of those extensions. You probably also need to move all nim code into a thread.
- chrisheller 11y agoHave you played around with Nimborg? That allows embedding Python in Nim fairly easily. https://github.com/micklat/NimBorg https://github.com/micklat/NimBorg I've been able to call into the Nim side from Python by treating the Nim code as C functions to call. That works, but it would be interesting to come up with a more Pythonic way of doing that.