News for hackers. Stuff that matters.
Re:C++: Using Variadic Templates Cleanly by jokoon on Saturday October 24, 2015 @02:26PM (#10444422)
There are not so many language who can directly compile and optimize to machine code though.

I'm not sure if java or C# can easily jit to have something that is close to machine code. Anyway having machine code directly (and no need for VM) is useful if you want to reduce the overhead and fully exploit your hardware.

Surely it's not for students or for casual programmers, but it has a use.

Re:C++: Using Variadic Templates Cleanly by skimpycompiler on Saturday October 24, 2015 @05:25PM (#10444918)
Yeah, not all features of C++ are for students. But writing highly efficient code if one's aware of the copy-move semantics is almost straightforward.

I can't remember when some larger projects rewritten in C++ turned out to be slower. Build tools, developing tools are superior to those 10 years ago, and the compiler(s) is still the best optimizer there is for production code.

Working in C++ today is easy. I sometimes feel a bit strange when I find that I'm oblivious about some hardships C++ developers had in the past, and today I didn't even know you can do it the hard way.

Re:C++: Using Variadic Templates Cleanly by nabla9 on Saturday October 24, 2015 @04:34PM (#10444761)
It would be easier to just design better language that compiles into C++ and can use existing libraries than continue with C++.
Re:C++: Using Variadic Templates Cleanly by blywi on Saturday October 24, 2015 @04:55PM (#10444834)
Ironically this is exactly how C++ itself started out: With a compiler that compiles C++ code into C.

https://en.wikipedia.org/wiki/Cfront

Re:C++: Using Variadic Templates Cleanly by pldrnt on Saturday October 24, 2015 @04:57PM (#10444841)
Incidentally, this is exactly what I am working on, grammar and parser are mostly done (the grammar is _regular_ and programs can rewrite themselves starting from their AST, because I really want something like `go fmt` one day), doing the transpiler at the moment, it's... interesting to say the least.

(it will be foss of course but nothing is published yet)

Re:C++: Using Variadic Templates Cleanly by nikbackm on Saturday October 24, 2015 @05:00PM (#10444850)
Use existing C++ (template) libraries? Does not seem that easy to me, seems that would impose quite a bit of complexity on the new language.