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

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: