3 ms·
If you're going to use Python with types, then you may as well use Nim. Nim has a similar syntax, but with better performance. You can also interface with Pytho
by jasfi 6y ago
If you're going to use Python with types, then you may as well use Nim. Nim has a similar syntax, but with better performance. You can also interface with Python code via Nimpy.
- craftinator 6y agoI love using Nim, it's an absolute pleasure after years of fighting with Python's "I hope I got this right..." style of type guessing. The biggest problem most people run into is that python has a huge library ecosystem. I haven't actually tried interfacing them, it's next on my docket. Have you found any good learning resources for that?
- jasfi 6y agoNimpy: https://github.com/yglukhov/nimpy https://github.com/yglukhov/nimpy A good test as an example: https://github.com/yglukhov/nimpy/blob/master/tests/tpyfromnim.nim https://github.com/yglukhov/nimpy/blob/master/tests/tpyfromn... I've tried it and it works fine. The only problem I ever had was trying to call a specific Python function at the same time from multiple Nim threads. I'm not sure where the fault lay exactly, I just made that part of the code single-threaded and moved on.
- nerdponx 6y agoI like Nim, but I don't think there is much of anything similar between these languages except the syntax.