News for hackers. Stuff that matters.
Re:Go 2, here we come by IshKebab on Thursday November 29, 2018 @09:24PM (#18566092)
It's people that have seen the abuses of C++ templates. They're very powerful and therefore people tend to want to use them for really complicated things.

Look up things like SFINAE and compile time metaprogramming. Templates were not intended for those things. When they work they're ok, but if they go wrong good luck following the 10 line error message.

Here's an example from Rust:

https://www.reddit.com/r/rust/comments/5nifpm/they_said_rust...

That's what people don't want.

Re:Go 2, here we come by johncolanduoni on Thursday November 29, 2018 @11:45PM (#18566748)
That's not compile time metaprogramming at all, it's just series of wrapped closures. It's basically the sequence of function call names preceding that call backwards, with different capitalization.
Re:Go 2, here we come by majewsky on Friday November 30, 2018 @05:17AM (#18568049)
The big difference between C++ and Rust is that, when you scroll down in this Reddit thread, it shows that the Rust guys have a clear path for fixing this issue, whereas there is no fix for this in C++ (that I'm aware of).
Re:Go 2, here we come by glangdale on Sunday December 02, 2018 @12:07AM (#18580920)
Ha ha, "10 line error". [ Puts on Monty Python voice] "What I wouldn't give for a 10 line error..."

Incautious use of the template mechanism - or just a minor typo - has given me couple screenfuls in the past.

Re:Go 2, here we come by int_19h on Thursday November 29, 2018 @09:46PM (#18566193)
Any sufficiently advanced type system can be used for compile-time metaprogramming - that's just an inevitable side effect of a type system expressive enough to capture all the more convoluted (but still plenty common) cases without hacks like interface{}.