3 ms·
> I've gotten a good impression of nim. Anybody out there who has tested that can say if my hunch is right or not? I've started using Nim couple of months befo
by narimiran 8y ago
> I've gotten a good impression of nim. Anybody out there who has tested that can say if my hunch is right or not?
I've started using Nim couple of months before last year's Advent of Code, after I've been reading about Nim both here and on Reddit.
As a Python user, I was immediately drawn to Nim's elegant syntax, which looked to me like "ok, just copy-paste my Python code, and declare some variables, and voila: 10-100x faster Python!", which is 80% true. The remaining 20% were "this works in Python, why doesn't work in Nim?" questions, which were promptly answered by the great Nim IRC community. I soon realized that those differences are what makes Nim great, and I began to really like the language.
I decided to solve AoC 2017 in both Python and Nim [0] so I could directly compare my solutions. This was a great experience for me, and I've learnt a lot.
In the past year I started using/liking Nim more and more (I have used Nim even at my work (numerical calculations, before done in Numpy)). This year I'm gonna solve AoC solely in Nim.
From my experience, your hunch is right.
If you have any Nim questions, let me know.
[0] https://github.com/narimiran/AdventOfCode2017 https://github.com/narimiran/AdventOfCode2017
- baldfat 8y agoThank you. That is the best answer to comparing languages I have seen by looking at your two codes. I never really thought of Nim as being that close to Python in syntax but seeing the two codes together I saw how you were able to achieve that and it was really insightful.
- alexeiz 8y agoFor me, Nim feels closer to Pascal than Python. They even say so on the "features" page: "Pascal-inspired type sections for leaner definitions."