So, not simple at all, then? Python is a very complex language hiding behind friendly syntax.
Do you just mean “with the syntax of Python”? Or does Nim’s similarity to Python go more than skin-deep?
So, not simple at all, then? Python is a very complex language hiding behind friendly syntax.
Do you just mean “with the syntax of Python”? Or does Nim’s similarity to Python go more than skin-deep?
Nim is much closer to Pascal / Modula / Oberon than Python. The whole - ease/simplicity of Python and speed of C is mostly marketing jargon that the Nim community has been using as long as I've been aware of the project.
In buzzword-speak, it's easy to write programs composed of nearly pure business logic while getting C++-level performance.
Given the space it's tackling I think Nim is a great effort and refreshing as it keeps a Python like syntax with a Pascal-like feel, which I feel is an underexplored evolution of languages.
I characterize Nim as Python with one major difference: where Python prioritizes "developer happiness", Nim prioritized performance. As a result, the syntax looks very similar, the edges are quite a bit rougher, and performance is exponentially better.
It still "feels like" Python in a lot of ways. The ways places if differs feel a lot like Haskell IMO.
this library should allow that: https://github.com/hraban/metabang-bind (never tried)
with some limitations: https://github.com/nimpylib/nimpylib/tree/master/doc/mustRew... no "end" argument in print, no triple quote and newline, no "a not in b" (write not (a in b)), no variable named _ (underscore), or double underscore, no slice as foo[:b] where the left part of the slice is not specified, rewrite foo[0:b], etc.