News for hackers. Stuff that matters.
Re:Rust's Type System Is Turing-Complete: Type-Level Program... by dvt on Friday March 10, 2017 @09:39PM (#13843869)
The "performance" you get by using templates is offset by binary size and/or compilation time. You can't get something for nothing.
Re:Rust's Type System Is Turing-Complete: Type-Level Program... by digikata on Saturday March 11, 2017 @01:38AM (#13844536)
Agreed, and then for example when you go to further reexamine performance and maybe try to fit parts of the binaries into cache, then you're trying to possibly optimize at two-different levels at the same time. This isn't to say that Rust will have the same problem, I hope it avoids it entirely. But if the question is why is there a vague feeling of dread when Rust declares a turing complete type system - a C++ template meta-programming ghost is the reason for me.
Re:Rust's Type System Is Turing-Complete: Type-Level Program... by kibwen on Saturday March 11, 2017 @02:23AM (#13844637)
As tatterdemalion's top comment in this thread states, the deliberate restrictions imposed by the Rust compiler prevent type-level programming from being used for the arcane tasks that TMPL achieves in C++. To say nothing of the fact that Rust has far easier and better ways of achieving metaprogramming than abusing the type system...
Re:Rust's Type System Is Turing-Complete: Type-Level Program... by pjmlp on Saturday March 11, 2017 @02:07AM (#13844596)
Compilation time is a consequence of lack of modules.

In C++11 you can pre-instantiate common used templates (extern template)and hopefully C++20 will finally get modules.

Until then, those that are able to use just VS C++ 2015 and 2017, can make use of incremental linking and experimental modules, to ease the pain a bit.