int main() { static_assert(std::is_same::value); static_assert(std::is_same::value); static_assert(std::is_same::value); }
James Wright
so this is like... C++ version of pattern matching on lists?
Eli Gray
If you're too much of a brainlet to understand such a simple metalanguage then maybe you should leave programming to the Indians and women.
Asher Scott
BEAUTIFUL
Josiah Hughes
>2018 >being confused by template templates what's difficult to understand
Brody Lewis
Gimme a break dude, no one needs to know this stuff outside of a few niche areas.
Brayden Taylor
>metaprogramming is "niche" yeah man fuck lisp what a piece of shit language no one ever accompished anything by writing that
Ian Gutierrez
The hilarious part is that, if something is wrong in this, the error message would be way less readable than some macro expansion error.
>If you're too much of a brainlet to understand why macros/full compile time execution would have been an infinitely better solution for C++ than "advanced" template metaprogramming, metaclasses etc. combined then maybe you should leave the C++ standard cumittee. FTFY
Xavier Howard
this but unironically
Eli Cooper
use constexpr t. brainlet
Kevin Stewart
etc. included constexpr
Isaac Fisher
>why compile time execution would have been a better solution than a bunch of other things including compile time execution ??????
Eli Moore
constexpr isn't really compile time execution, just const reduction
Matthew Stewart
How do I attain such fearsome job security?
James Clark
what said If it can't obsolete external build systems like it does in Jai/Common Lisp it's not good enough. That said isn't exactly wrong, because rarely anybody these days knows what good metaprogramming facilities look like.
Kayden Phillips
>the error message would be way less readable than some macro expansion error. I just fucked around with compiling that code trying to get one of these ridiculous error messages (I've seen what you're on about), and I discovered something even worse: no error messages at all because the mistake is still valid code (but it won't do what you want).
Levi Anderson
I would say "Classic C++" but that's even worse.
Nathaniel Diaz
it is in c++17
>If it can't obsolete external build systems you don't want this, all you're doing is slowing down compile times and bloating the executable because you can't be assed to learn a build system
Owen Rogers
C++ is a good language if you want to write hundreds of lines of nonsense without doing any actual computations.
Landon Morgan
Some argue that powerful abstractions make languages better, but this only the case if used by skilled developers who know what they are doing with the abstractions and how to use them effectively. C++ is the maximalist example of this.
Java is a great example of how retards ruin abstractions. Most OOP class hierarchies are some of the worst most pointless shit there is because developers are too fucking dumb to know how to use them effectively and how to pick the most minimally abstract solution.
Rob Pike was actually right about Go, because forcing dumb people to use less abstraction leads to better more maintainable codebases than retards using high levels of abstraction.
Brandon Howard
Jai proves you wrong. The compile time code doesn't end up in the executable and the additional time required is easily matched by the shitty scripting language that all build systems for C++ use.
>it is in c++17 Okay, it can only evaluate some more pure expressions now. Still far from powerful enough in particular for what you pay in return. >inb4 muh pure reproducible builds If that was actually a concern - which it isn't - you could always have a pure switch.
Juan Cruz
>Jai this is vaporware >The compile time code doesn't end up in the executable no but the O(n^2) amount of memory you allocated for compile-time output will and it will also probably crash your build eventually, i don't think i need to explain why this is a bad idea. continuing work on large C++ projects is about reducing build times, not adding to them >reproducible builds aren't a concern i would really hate to be trying to test whatever software it is you're shipping