Better HN
topnewbestaskshowjobs
Log inSign up

cdunn2001

5 karma · joined May 18, 2014 (12y ago) · 3 submissions

Submissions

comment 9y ago · link · parent

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

For calling Python from Nim: * https://github.com/nim-lang/python/tree/master/examples

comment 9y ago · link · parent

Nah, I've always found quick answers to questions in the forum.

Simplicity is under-rated. With Nim, most problems are easy to grasp just by reading source code. And when I don't understand the docs, I look for a simple example at http://rosettacode.org/

comment 9y ago · link · parent

Yes. Use the Boehm-Weiser GC. Very simple.