I've just read through the Nim manual. On the surface, it looks as simple as Python - but it is ridiculously deep when you look at all the template, macro, term rewriters, etc.<p>Whether or not you can make use of it without being aware of all those things remains to be seen. I suspect the answer is mostly yes, i.e. that one can use the nim ecosystem effectively without knowing all of that. (my answer for C++ would be "mostly no" - you need to really know everything about all the dark corners of the language to use the ecosystem effectively).<p>I'm trying to think of a good way to implement automatic reference counting with copy-on-write, e.g. for big arrays, but haven't come up with one yet. Could a Nim veteran kindly point me in the idiomatic direction?
For those wanting a quick grasp of the language, here's Nim in action:<p>- against Python: <a href="http://rosetta.alhur.es/compare/Python/Nimrod/#" rel="nofollow">http://rosetta.alhur.es/compare/Python/Nimrod/#</a><p>- against Ruby: <a href="http://rosetta.alhur.es/compare/ruby/Nimrod/#" rel="nofollow">http://rosetta.alhur.es/compare/ruby/Nimrod/#</a>
I'm intrigued by Nim after browsing through some of the basic tutorials. Looks quite straightforward to get started. As with other languages I look at, for my use-cases it's important for me to understand0 if scientific packages are available and if there's a "scientific computing ecosystem".<p>I had a look through the `packages.json` [1] listing for Nimble [2] and couldn't really spot the maths packages that I'd need, e.g., numerical integration, optimization, linear algebra. Given that I can't find any of those, I'm guessing there aren't any physics packages either e.g., Newtonian mechanics, physical constants etc. Maybe maths libraries are available as ports to e.g., Eigen, NLOPT etc.?<p>Can anyone that is more familiar with the community comment on the potential of Nim as a language for scientific computing, in contrast to e.g., Julia?<p>[1] <a href="https://github.com/nim-lang/packages/blob/master/packages.json" rel="nofollow">https://github.com/nim-lang/packages/blob/master/packages.js...</a><p>[2] <a href="https://github.com/nimrod-code/nimble" rel="nofollow">https://github.com/nimrod-code/nimble</a><p>[3] <a href="http://eigen.tuxfamily.org/index.php?title=Main_Page" rel="nofollow">http://eigen.tuxfamily.org/index.php?title=Main_Page</a><p>[4] <a href="http://ab-initio.mit.edu/wiki/index.php/NLopt" rel="nofollow">http://ab-initio.mit.edu/wiki/index.php/NLopt</a><p>EDIT: Fixed typos
I'm quite surprised that Nim's strings are null-terminated, <i>and</i> have a length field. According to a forum article[1], it is mainly due to the C interoperability.<p>I understand that FFI is kinda important for system languages, but isn't it giving up too much to disallow null characters in the middle of a string? Null-terminated strings generally work well, but there have been some corner cases that made me annoyed. (Such as PHP's preg_* functions)<p>[1] <a href="http://forum.nimrod-lang.org/t/125" rel="nofollow">http://forum.nimrod-lang.org/t/125</a>
Nice tutorial pitched just right for me. Looks a lot like Iron Python iirc. I like that you can start writing old school interactive command line apps so easily -- great for starting out and in the absence of solid gui tools.
I don't see anything particulary special here. The metaprogramming features are quite weak. The macro system is very primitive. The number types seem to be lacking, too. I don't see anything about bignums, rationals, or complex numbers.