I have a question that I have been thinking about since I discovered Nim. How does Nim compare to other languages like C/C++, python,Java as far as productivity and terseness? How compact are Nim applications? Can one write a Nim equivalent to a C++ program in dramatically fewer lines of code? And last but not least, does the macro system significantly reduce the amounts time and code needed?
For instance JonesForth a complete Forth interpreter written in C took around 1100 lines of C code. With Nim would the number of lines be reduced? Less time spent coding would benefit employers and corporations being able to spend less money on any given product. And would maybe be easier to maintain and scale.
IME Nim code is almost always shorter and it's easy to see why: It doesn't have lines full of } } }. ;-) That's hardly an objective bonus to "productivity" because syntax is simply not that important.
How compact are Nim applications?
It depends on the coding style.
Can one write a Nim equivalent to a C++ program in dramatically fewer lines of code?
Yes, for multiple reasons: Nim has no header files, Nim's indentation based syntax helps, Nim's macro system allows one to work on the level of the problem domain.
And last but not least, does the macro system significantly reduce the amounts time and code needed?
Yes, if you do it right, see any Karax- or Jester-based application.
For instance JonesForth a complete Forth interpreter written in C took around 1100 lines of C code. With Nim would the number of lines be reduced?
Yes. But notice that C programmers do not care about "reducing the number of lines", C is about long_identifiers_because_no_namespaces and about if (err) goto errorHandler because "exceptions are bad".