In what cases is Nim a better option than Rust? Would be great if anyone with more experience can share more information.
I consider Nim to be a compiled, faster Python. Nim is very easy to read and understand, and prototype in, vs. Rust.
Nim in 2020: A Short Recap
51–60 of 121 posts
Re: Nim in 2020: A Short Recap
#52Too bad nim uses a whitespace-sensitive syntax like python, something I personally dislike.
That's actually one of it biggest advantages over the competition. I wish more languages cared about readability.
Re: Nim in 2020: A Short Recap
#53It's a nice language with a great standard library. Implicit static typing is great after a bit of getting used to. Some things like tuples or "Object Variants" are fun to use.
The only thing I'm missing is strong debugging support. You can use GDB and there is even some basic support for debugging in VSCode (through gdb behind the scenes). But most of the time I had to fall back to simple "echo" debugging because names were sometimes mangled, variables were not displayed or lines in nim did not correspond with lines in the final output, making debugging a chore. Unfortunately someone once started to write an embedded debugger (ENDB) for all platforms, but development stopped.
What's your opinion on this? In some way I would love to use Nim more in the future, but I'm afraid, that the larger the codebase gets, the more I'd suffer just because of debugging...
Re: Nim in 2020: A Short Recap
#54Earlier quoted context omitted.
You're free to use Golang or another language. Nim has a great feature set and will be a good fit for Python or Ruby teams wanting a more performant language. At the same time, it's more expressive than Golang and will fill a niche Golang couldn't meet. I like that we now have Golang, Rust, Swift, Nim, and Kotlin. They're all doing new things and excelling at their own niches.
I already use golang for work, and now I'm just doing a little toy project in nim. What I like most about nim is that it has generics, and produces binaries with small size. I'm creating a graphical program with a http server running in the background, and mixing asynchttp with UI threads is a bit of a pain in the posterior. Granted, I'm new to the language, I'm considering using channels, maybe that will make it eas…
Ideally you shouldn't need to use UI threads and instead integrate the async loop into the UI's event loop or vice versa. Happy to advise more if you can let me know which UI framework you are using :)
This being said, I am hoping to implement better support for using `spawn` and channels with async, i.e. the ability to await the result of `spawn` or a channel. I think that will make a lot of use cases much easier.
Re: Nim in 2020: A Short Recap
#55Too bad nim uses a whitespace-sensitive syntax like python, something I personally dislike.
Re: Nim in 2020: A Short Recap
#56In what cases is Nim a better option than Rust? Would be great if anyone with more experience can share more information.
The relative simplicity of the language is a feature. I can imagine introducing Nim to embedded/microcontroller firmware developers that only know/use C99 now. I cannot imagine introducing Rust - while a great language, it is C++ level complexity - and that is not always warranted.
Re: Nim in 2020: A Short Recap
#57Too bad nim uses a whitespace-sensitive syntax like python, something I personally dislike.
BTW, if we are talking about things that really goes on nerve for me it is the fact that Golang doesn't compile when there is unused imports in the module, so I can't simple comment a random line and try to compile it again. But I know people that like this because they editor are configured so the import is automatically removed. Ok I guess, but I still find this behavior annoying (I would much prefer that this was a compiler warning).
Re: Nim in 2020: A Short Recap
#58In what cases is Nim a better option than Rust? Would be great if anyone with more experience can share more information.
Re: Nim in 2020: A Short Recap
#59In what cases is Nim a better option than Rust? Would be great if anyone with more experience can share more information.
I'll consider Nim next time I'm looking at making a python project. However - most of the times this happens is if I'm making a web backend or doing something numerical, where Python has a library advantage.
Re: Nim in 2020: A Short Recap
#60Earlier quoted context omitted.
That's actually one of it biggest advantages over the competition. I wish more languages cared about readability.
Readability is exactly the reason why I prefer explicit start/end markers, and dislike the Python-like implicit style. So yeah, for me it makes the language less readable, that is, it makes it harder to parse the code as I read it. Your mileage may vary indeed...