3 ms·
I'm sure I'm not the only one who doesn't like how these things are bolted on and shoehorned into the existing constructs, resulting in some ugly-ass syntax. Co
by discardorama 10y ago
I'm sure I'm not the only one who doesn't like how these things are bolted on and shoehorned into the existing constructs, resulting in some ugly-ass syntax. Consider:
auto triple = std::make_tuple(5, 6, 7);
std::cout << std::get<0>(triple);
Ugh. And don't even get me started on "myList.push_back(5)" . "push" usually means "add to the front"; why not use "append" ?
- leetrout 10y agoSigh - I know why you got downvoted but I came to post the same thing. I don't program in C++ but specifically the std::get<0>(triple) It really doesn't look great. It looks like the template syntax using the <>. I'm sure I would get used to it if I were using it every day but from an aesthetic sense it doesn't win me over.
- SamReidHughes 10y agoIt is the template syntax.
- SamReidHughes 10y agoIn Perl, "push" means "add to the back."