[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
C++11/14 WTF (Late to party edition)
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 12
Thread images: 1
>learn C++ in 2013, use a nice book from like '08
>do a few small projects, adhere to my book
>live in total ignorance to C++11
>job doesn't require C++, stop using it
>now 2016 and lf new job, learning C++ again
>get pic related because I had also used '92 edition initially and it was awesome
>get pummeled in the ass with auto, decltype, rvalues, lvalues, universal references
>templates all over my cock and balls, moves and forwards slapped across my face

THE FUCK HAPPENED /g/?

Is it really all for the best?
>>
>>53816059

It happened because C++ wants to be modern and hip.

But as long as C++ has the legacy of C++ from 1998 and C compatibility, it will be still a mess of a language.
>>
>>53816127
Scheme is a good programming language and it was made in 1970.
>>
dont forget lambdas
>>
>>53816262
yeah that too, although I found lambdas to be one of the more straightforward concepts, at least in basic use.

>>53816127
I really felt that at first and I was pretty pissed but now that I've finished the book a lot of it seems... necessary.

I haven't started digging in the trenches and writing some C++11 style code yet though, have that on deck for tomorrow. I mean what's the word, are hardcore C++ guys loving this? It seems like you can optimize your code now more than ever and employ a bunch of fancy and safe builtins that generally do a better job than the old methods at no cost.
>>
why would you want to work in C++ then?

i forgot all about C/C++ after my CS degree and i haven't looked back since. i will never apply for a job that requires it because low level is simply not my thing.

learn things that interest you, then look for jobs that will let you do it for money.
>>
>>53816391

wait until you find out in runtime that lambdas in C++ have no closures and will easily reference to things that no longer exist.

this language is such a mess.
>>
Whenever I use C++ I just pretend its C with OO. I use templates but that's about it.

Of course I've never had to do it professionally.
>>
auto is just basic type inference. There's nothing to learn there.
decltype isn't something you need to care about until you're interested in writing your own (complicated) templates, which probably won't happen for a while.
rvalues are related to move semantics which are a large part of C++'s approach to memory safety and really is all for the best.
You probably already know what lvalues are.
"Universal references" are Scott Meyers' awkwardly coined term explaining how rvalue parameters also accept regular references and isn't a particularly notable or distinct feature of the language.

C++11 is much, much better than C++98.
>>
>>53816488
but I mean runtime issues have always been an issue with C/C++, with great power comes great responsibility right? I feel like some of the bitching comes from us getting spoiled from other languages and relying on safe STL behavior.

>>53816463
The field I'm looking to move into uses C++ almost exclusively.
>>
>>53816488
>wait until you find out in runtime that lambdas in C++ have no closures and will easily reference to things that no longer exist.

What do you mean by saying they "have no closures"? They have both pass-by-value and pass-by-reference closure semantics. That's what the parameter list is for. Closures over invalidated references aren't easy to do unless the references were already invalidated in the enclosing scope or you're passing between threads.
>>
so it seems like the resolution is if you actually care about programming and really want to learn your craft then C++11 is awesome, but if you're just a monkey who wants everything done for him suboptimally you stick to Java.
Thread replies: 12
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.