Re:Rust for Python Programmers
by the_mitsuhiko on Wednesday May 27, 2015 @09:59AM
(#9611347)
The 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.
[ Parent
| on HN ]
Re:Rust for Python Programmers
by chrisheller on Wednesday May 27, 2015 @12:03PM
(#9612309)
Have you played around with Nimborg? That allows embedding Python in Nim fairly easily.
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.
Can you expand on why that is?
Re:Rust for Python Programmers
by the_mitsuhiko on Wednesday May 27, 2015 @10:57AM
(#9611802)
Nim 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.
Re:Rust for Python Programmers
by untothebreach on Wednesday May 27, 2015 @10:26AM
(#9611529)
Just 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