Follow

would you write this
auto x = *it;
// modify it
if(error)
*it = x;

instead of this?
auto x = *it;
// modify x
if(ok)
*it = x;

like you think you are making a backup or something? who would do that? cmon...

in general would you make a copy and hold on to it unless you want to modify it? why?

Show thread

ok in your closet maybe, but not in generic code cmon, not in a libraryyyyy ToT

Show thread

One of the severe problems with C++ (>C++98) is that it teaches horrible behaviors like the use of "auto"... which really translates to:"I have no idea what this is!".

@namark

@Firaas I take it your prefer
typename std::iterator_traits<typename std::remove_referece<It>::type>::value_type

No STL, and no nonsense containers...

harmful.cat-v.org/software/c++

For a breath of fresh air, try C (C99) instead 😉

@namark

@Firaas so you were just pretending to know c++ and what auto's for?

sure, fresh air, as in the crippling smell of rancid bloat.
qoto.org/web/statuses/10472254

Listen here, kiddo: you know nothing about me

@namark

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.