Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Lor-inc491747dYeah, the STL is massive and the general workflow gives the impression that C and high abstraction don't mix well.
RememberMe1368447dBecause I like using a
std::vector<std::map<std::pair<std::string, std::deque<std::string> >, std::list<std::vector<int> > > >
data structure unironically :p
And it's actually so damn satisfying to slap a ::iterator in front of that horror and have it work because STL is so damn well designed.
Curious where you're having to use std::bind though.
Lor-inc491747d@RememberMe I'd say std::bind is pretty normal when you want to pass a callback but discard the result, or add placeholders to some params that your callback uses. It can save you a whole connector function. But only if neither the callback, nor the host are from a C api, because those don't work with std::callable or whatever the interface is called.
Fast-Nop2843547dBecause devs were underused and bored in the project so that they made it more challenging by introducing a lot of garbage. Incidentally, that's also how C++ arose in the first place.
Hazarth147747dI Agree with @Lor-inc
std::bind and the whole <functional> really make C++ more usable these days. Its easier to use bind than to pass around bunch of function pointers or designing a custom interface for this
std::move can also bypass some ugly memory logic so the code looks neater
std::tulple is more of a convinience, if you know what touples are then its also more readable than structs or custom classes
I don't think I ever used ::tie!
One really cool one is std::variant, which is just a fancier and safer union.
But I get what you're saying. C++ has become heavily experience oriented and It's almost impossible to read or debug unknown code without the docs handy. I don't necessarily think that's a bad thing though, all those std:: functions are not needed, but once you know them, they can reduce the amount of boilerplate dramatically
You're jonesing for first order intermediary encapsulation and some logical destructuring assignments, but you're in C++ so you do what you can.
xjose97x15Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
sam966912Hats off to this lady .... I would have just flipped the machine