a few days ago DrDobbs published a small article about Nimrod language. i've read the paper, then language tutorial and manual and found it very promising:
  • Nimrod is compiled down to C or JavaScript, making it highly portable and almost as efficient as C++
  • It supports simple OOP, managed and unmanaged pointers, GC, closures, user-defined operators, generics (a la C++ templates), discriminated unions, exceptions, RTTI - well, almost every technique i've ever seen in compiled languages
  • But the most exciting part is the support of syntax macros (called templates). They look like ordinal procedures, but with flexible parameter types and their body is textually inserted at the call place, so you can do everything with types, identifiers, expressions and code chunks passed as parameters. And even ordinary procedures may be implictly generic by supporting type classes (such as all objects, all structures, all objects and structures, all ordinal types or just "int | int64"). Generic programming, compile-time execution and syntax macroses together make Nimrod a truly low-level language allowing one to generate lots of boilerplate code without sacrificing performance


So, in theory, Nimrod looks as very strong candidate to replace C++. It supports both modern high-level techniques and proper support for low-level coding. On the practice it don't yet reached 1.0 version, so it's not all roses:
  • Trying a few small examples, i got compiler panics twice. Well, that's not problem by itself, but if codegenerator have any bugs, it will make the entrie thing useless
  • I tried simple program computing multiplicative hash of file in C++ and Nimrod, and C++ was faster. Although Nimrod compiles to C, the generated code uses simple while() loop and it seems that GCC isn't smart enough to optimize it as much as native for() loop. This may be solved in future by direct LLVM backend
  • And finally, while low-level programming is possible, code isn't as terse as with C++, with more typecasts required, and "shr/shl/and..." operator names