A journey into Rust

So, the day has finally arrived!

If you haven’t lived under a rock for the past years, you’ve probably heard of Rust, a moderately recent programming language developed inside Mozilla Research in the late 2000s.

If you don’t, it will be impossible to summarize it in a few words, but let’s say that is a compiled language, focused on high performance (ideally comparable to those of C++) and memory safety.

Continue reading 🠒

A tricky, yet common pitfall of C++'s auto

auto is probably one of the best thing ever happened to C++.

And I say this despite having been extremely wary of it for a while: coming from C, I felt that lack of a clear indication of a variable type scary, error-prone and flat-right wrong.

But it didn’t take too much to understand why auto is a great addition; if you’ve read my previous posts, you know how much I care about Code Clarity, and despite what some people say about auto making code less clear, I think that the number of cases if which it makes things way easier to read outweighs, by a huge margin, the few cases in which we are better without using it.

And still, after years of using it, I keep falling victim of an annoying aspect of auto that I will never learn.

Continue reading 🠒

Push_back and its younger brother

Let’s try one thing

Do me a favour. Open up a project, any project, and search for all the occurrences of (std::vector)push_back.

Done? Write down the number of results.

Now do the same with emplace_back. Compare the results.

Continue reading 🠒

Ranges, action!

How Ranges actions can make code more readable

In the last few posts I focused on Ranges views and how they make code more clear and readable.

Well, as it turns out, this is true also for actions, maybe even more!

Continue reading 🠒

About some Range coolness...

Small note: the posts about Advent Of Code are temporarily suspended, I need to devise a better way to present them, as they would have become boring and useless quite fast… I will probably focus just on two or three really interesting challenges and skip all the rest.

Continue reading 🠒

Ranges.. now what?

If you are just a bit like me, you are eagerly waiting for C++20 to be released and you are constantly browsing websites and blogs to discover new features.

Continue reading 🠒

Advent Of Code 2018 - Days 3 and 4

Let’s continue the analysis of Advent Of Code 2018!

Some string manipulation entering the scene, and more data structures we will need in the future!

Continue reading 🠒

I survived the Advent Of Code 2018

As promised in last Monday’s post, I want to share with you the experience of finally completing, for the first time in my life, a full Advent of Code challenge.

Continue reading 🠒

I'm not dead!

My gosh! The last post on this blog is over 7 months old!

Continue reading 🠒

A templated multidimensional vector

Disclaimer: as you might have read in my presentation post I’m not a C++ expert, I consider myself as a C++ programmer who is trying to increase its experience from the academic view towards a real-life programming.
I will share with the readers my findings, with all their errors and imprecisions; don’t take what I write as correct, by any means, but rather feel free to scrutinize, check and correct me for any error! Posts that will fit in this category more than the other will be all put inside the learn category.


Continue reading 🠒