Friday 27 January 2023

A proposal to improve C++ safety

A serious proposal to improve C++ safety

The C++ of old times

When I began my voyage in the land of programming, my teacher taught my classmates and me C++. It was a really good way to start programming, since it gave me a deep undestanding of how a program is written and how computers work (thank you, Renato Conte!).
C++ at the end of the '90s was almost a C with classes. Sure, we had streams, but it lacked lists, vectors and even strings where still C's characters arrays. Without Boost libraries, programming in C++ gave little more than plain C.

Thursday 17 November 2022

Hands up! Measure! And keep it simple!

At the end of this post I will expose an example of a speedup of 8000x. This means that a program that at first took almost five hours to complete, ended up in two second.
A ratio of 8000:1.
Pretty impressive!

Wait! What?!

Monday 24 October 2022

Why C++ is difficult

C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out, that in itself would be a huge reason to use C.

Source is here. Many of you will recognize these words: it's a piece of Linus Torvalds' rant aganist C++, when some developers asked him to move Git from C to C++.

Monday 26 April 2021

Between the product and the prototype


So, it seems lead isn't a good material for wings
(Australian War Memorial collection, No restrictions, via Wikimedia Commons)

These days I had a conversation with my colleagues about Python. One of them supported strongly the argument that Python is a good language for prototyping, but not for a final product. As stylists prepare prototypes for their new dresses with cheap fabric and then made the final product with the costly silk they designed from the very beginning.
To better support the paragon, they asked me: would you make the software control of a robot in Javascript or PHP?
Strong opinion, indeed. My answer was "no, because they are languages with big ambiguities".
But Python?