Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I loved Nim when I used it first.

But I left it because of recursive imports. I had to basically put all my types into one file and use them from various others. For a relatively medium sized project (~10LOC), its a but of a hassle. Refactoring is an issue.

That being said, the language is fantastic. Can anybody with experience suggest me what HTTP library/framework do they prefer for servers?



The lack of recursive imports can be annoying, but I found I don't mind it. It keeps your module tree into a DAG.

Chronos is probably the most feature rich and uses async. Mummy is newer and uses a threading model. Both are used in production.


Node and Python also don't really work with circular imports.


Python doesn't work with circular imports. NodeJS does. After using NodeJS for such a long time, I think it is a feature that is taken for granted.

That being said, the Nim team is working on it as per a few issues: [1] https://github.com/nim-lang/rfcs/issues/6 [2] https://forum.nim-lang.org/t/2114

I love the language, and this is probably the only bottleneck for me.


Node really doesn't work with circular imports. There are runtime gotchas with it, for example destructuring a cyclic import via require() will give undefined for the destructured values as they "don't exist yet".

Glad to see progress on the Nim side!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: