Re:Learning Programming with Nim
by a012 on Wednesday June 13, 2018 @10:22AM
(#17303306)
That's impressive. I'm curious whether I can use Nim in sysadmin job.
[ Parent
| on HN ]
Re:Learning Programming with Nim
by kaushalmodi on Wednesday June 13, 2018 @10:50AM
(#17303602)
I am dabbling in Nim, and plan to replace bash/Python scripts with Nim. So far it looks really promising!
Few projects: nbuild[1], ntangle[2].
I wouldn't say that these are exemplary projects.. but they just show that Nim can replace bash/Python for command line utilities.
[1]: https://github.com/kaushalmodi/nbuild/ [2]: https://github.com/kaushalmodi/ntangle/
Totally feasible, I ported Python code to Nim and it was super easy and I got a huge performance boost.
If performance isn't a big deal, the other thing I've noticed is that compilation guarantees a much higher quality of code compared to interpretation. At least compared to Python, I have been hit by bad code which didn't get caught because there was no test for it. I've not faced that with Nim yet.
No doubt you can still have issues but it's one less thing to worry about.
You also gain portability; no worrying about which Python version is installed on a target machine for example.
Nim competes very well with Python, Go and Rust in the sysadmin / system library / daemons space.