Hacker News new | ask | show | jobs
by FpUser 1652 days ago
>"Being able to write code that doesn't crash after a while isn't really a high bar."

Totally agree.

>"it quickly gets ugly because you have to deal with legacy code that wasn't written in modern C++"

I do not work with the projects (I assume monoliths) of such size so I guess I can count myself lucky. I would guess though that this amount of code accumulates over many years and I suspect that the majority of languages along with libs and other accompanying stuff would change as well over the time. Maybe C++ is not so special in this regard.

I was hired once to fix old PHP application which was insanely giant. The type of code I saw there ranged from beautiful to making me nearly puke. It looks like the situation similar to what you've described but in completely different language. Again the cause here I think is total size, many developers coming and going and their qualifications.

Also for as long as I can remember (40 years) I've almost exclusively worked on creating new products from scratch. Again extremely lucky. For new projects I would definitely advocate C++. But if one wants to do it in Rust / (insert your own favorite) for example I have nothing against it. Seems like a matter of taste to me (assuming compile times are reasonable and do not impede workflow).

I would admit that I would never dare to write / mess with some code I see in system libraries or some other template heavy libraries. It can be extremely complex language wise. But I've already mentioned it in original post. Do not try to be Alexandrescu. Those are special people. And this is also special purpose type of code that is not needed for general application programming.

1 comments

You make one very important point: code that accumulates over many years. Not least in libraries you depend on (which make up a significant part of a lot of non-trivial code).

This is is bad in every language as it often means you get code that was written for a different version of the language. But for C++ it is particularly bad because C++ has spent so many years not even getting the most basic things right.

And when I say basics, I mean things like a string type that people will consistently use.