Ninth week

What did you do this past week?

Finished up the allocator assignment, and worked overtime on my AI project. At the end of the day we think we finished up the AI assignment, but it was difficult to tell as it turns out that the algorithm we were implementing was pretty mediocre in the environment we’re working in anyway.

What will you do next week?

I have an exam in Big Data Programming which I don’t feel particularly prepared for (discussion of the content of the exam has been fairly vague), and also a large big data programming assignment to finish.

I also will need to work a significant amount on our newest AI assignment, hopefully it’s more clear than the previous one.

What’s in your way?

Apathy. I have a lot that needs to get done, and less motivation than I would normally have to actually do it. I’m still doing relatively well in my courses, but I feel like I’ve been coasting a lot this semester.

The inevitable last minute crunch-time right before things are due has also cut into my ability to put in as many hours at work as I would like.

What’s my experience of the class?

It’s going well, we’re covering more and more things which I haven’t been taught before, basically anything and everything which isn’t part of the C++98 standard is new to me.

Man is that move() syntax ugly though.


There is actually one other way to avoid the ‘double copy’ issue, and that is:

object bar() {

return object;

const object& foo = bar();

Const references to temporary objects have a lifetime which is guaranteed by the C++ standard to have an extended lifetime. Note that the const is necessary (see: ).

It’s worth noting that you should really just use the C++11 move semantics. I don’t know the exact mechanics of how the lifetime of the temporary is extended, but I imagine it’s not as clean as a move constructor.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s