4 ms·
https://nim-lang.org/docs/parsecfg.html https://nim-lang.org/docs/parsecfg.html (Scroll to the examples.) An exception would be thrown on error. That exceptio
by cdunn2001 9y ago
https://nim-lang.org/docs/parsecfg.html https://nim-lang.org/docs/parsecfg.html
(Scroll to the examples.)
An exception would be thrown on error. That exception could be trapped in a simple try/catch block.
Nim is very similar to Python -- but statically typed and compiled (quickly) to machine code. There are many situations where Python is a better choice than Nim, but if you're looking to translate Python code for speed and type-safety, Nim is worth considering.
And if you want to translate Python to Nim gradually, look at this magic:
For calling Nim from Python:
* https://github.com/jboy/nim-pymod https://github.com/jboy/nim-pymod
For calling Python from Nim:
* https://github.com/nim-lang/python/tree/master/examples https://github.com/nim-lang/python/tree/master/examples