Saturday, June 21, 2014

Five New Videos

It seems that every place I go these days, people are pointing a camera at me and pressing Record. As a result, there are five new videos available at my Online Videos page:
Happy video viewing!

Scott

10 comments:

Anonymous said...

Easy to use correctly and hard to use correctly? I think you're missing an "in" there, Scott.

Scott Meyers said...

Yep, fixed, thanks for pointing out the most embarrassing kind of error...

Юрий Лодочкин said...

Scott, thanks. Very interesting stuff, as always. Have a good day.

Unknown said...

BTW, did you publish the Moscow C++ party video? http://tech.yandex.ru/events/cpp-party/june-msk/talks/1954/

Scott Meyers said...

@Timur Safin: I didn't know about this link. Thanks for posting it. I'll add it.

Anonymous said...

Did you publish your slides somewhere?

Scott Meyers said...

@Anonymous: I'll make the slides available for the talk at the D Conference and for the talk at the Moscow C++ Party (look for links to them them by the end of this week at my Online Videos and Past Talks pages), but I think I'm going to hold off on the slides from my NDC presentations, at least for the time being.

Anonymous said...

Hi Scott - you mentioned something (which I think a lot of developers read & quickly forget) in your talk about auto - the fact that iterating over a map with the construct

for(const pair<K, V>& pair : myMap)

creates a temporary pair (since the real entities in the map are pair<const K, V>). Do you know why compilers don't seem able to optimise this away if you don't use / modify the key? It seems like such an obvious win...

Scott Meyers said...

@Anonymous: It seems obvious to humans, but to compilers, myMap contains objects of type T1, and pair is of type T2, and you're asking them to do the analysis to prove that operating on objects of type T1 is the same as operating on temporary objects of type T2 that were initialized by objects of type T1. The optimization is permitted under the as-if rule, and compiler-writers could probably put in special checks in the front end to look for opportunities to use it, but they'd have to ensure that operating on an object of type T1 was the same as constructing an object of type T2, operating on that object, and then destroying that object. To the best of my knowledge, no compiler currently has special checks to see if they can do that.

Anonymous said...

Scott, many thanks for the swift response and for all the videos - I'm a huge fan of your works and explanations!

mzc