3 ms·
Other than having superficially similar syntax, is Nim really Python-like? Also, Nim seems to be targeting a different niche from Python. As Nim is statically-
by pansa2 6y ago
Other than having superficially similar syntax, is Nim really Python-like?
Also, Nim seems to be targeting a different niche from Python. As Nim is statically-typed and AOT-compiled, its closest competitor is probably Go. The difference is that Go deliberately tries to be a simple language, while Nim is much more complex.
- nafey 6y agoIn what ways will you say Go is simpler than Nim? I did try out Go but found it a bit difficult. Maybe would need to spend some more time.
- tyingq 6y agoNim does have a fair amount of Perl like "more than one way to do it" things. Like countup(), ".." and "..<".
- auxym 6y agoNim has more features like generics and metaprogramming via templates and macros. You don't have to use them, but if you read someone else's code that uses it, you might have trouble understanding it, which probably doesn't happen with Go.
- cma 6y agoGo is adding generics, so you may have to read other people's code using them.
- mesaframe 6y agoThat's a poor excuse. You cannot do everything in just few things and would want things that help you do more, or create abstractions easily. That will require additional syntax. In Go absence of generics will make you write more code that will increase code length unnecessarily.
- auxym 6y agoFWIW, my answer was not meant to be trashing nim. I like and use nim. And to be perfectly transparent, I know relatively little of Go. My impression is that nim has more features in general, which could be considered to make it more complex. That can be a good and/or bad thing depending on perspective.
- auxym 6y agoNim's pascal-inspired type system is very powerful it feel very different to me. Maybe "a better Pascal with Python syntax" would describe it better?
- planetis 6y agoI partly agree with you, Nim is a complex language. Just have a peak at the manual https://nim-lang.org/docs/manual.html https://nim-lang.org/docs/manual.html , where Nim's features are documented. However for me Nim appeared simpler when starting out. Not much get in your way when prototyping and scripting. Other languages require some mental overhead. I'm referring to Go's error handling, Java's mandatory exception handling, Rust's tracking lifetimes, etc. Thus it's much more pleasant to use than the rest.