@r technically that optimization is not specific to tuples, it would treat any type that way. From language feature point of view you can call a function with a tuple as the parameters with std::apply, and if the function returns a tuple you can decompose it in place
auto [x, y] = func();
In general any type can work this way if you make it tuple-like by specializing a couple of standard templates for it. That said the tuple itself is way more powerful and important than any of that syntax sugar.
this post was made by c++ gang (now that has got to be a real gang)
@hyphen @tuxcrafting @fluffy
@hyphen *looks up GHC*
"it can make c code and send it to gcc
or compile to binary itself
or use an llvm backend"
reaction:
hehe, of cource it uses gcc
or whaaa? cool
or blasphemy!
@hyphen
nothing can beat g++ in slow! It gives you time to think about what you have done, and be ashamed.
I wish I knew mercury, maybe then it would stop calling my code non-deterministic ToT