• 0 Posts
  • 4 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle
  • I think you are right that optimising engineering cost is the goal of these practices, but I believe it is a bad thing.
    In the end the only people that benefit from this are the owners of the product […]

    Yes, that’s exactly how the for-profit software industry (and really any for-profit industry) is run. The owners maximize their benefit. If you want to change that, that’s a much different problem on a much larger scale, but you will not see a for-profit company do anything but that.


  • I thought the point of “clean code” was to make a software source code base comprehensible and maintainable by the people who are in charge of working with and deploying the code. When you optimize for people reading the code rather than some kind of performance metrics, I would expect performance improvements when you switch to performance optimization. The trade-off here is now code that’s more performant, but that’s more difficult to read, with interdependence and convolution between use cases. It’s harder to update, which means it’s slower and more costly (in engineering resources) to upgrade.

    In a lot of modern software, you don’t need extreme performance. In the fields that do, you’ll find guidelines and other resources that explain what paradigms to avoid and what are outright forbidden. For example, I have heard of C++ exceptions and object-oriented features being forbidden in aircraft control software, for many of the reasons outlined in this article. But not everyone writes aircraft control code, so rather than saying clean code is “good” or clean code is “bad,” like a lot of things this should be “it depends on your needs.”



  • I think inheritance served as a good stepping stone to features like traits in Rust. I spent most of my early career in C and C++, and given just those 2, I would pick C++ for classes alone, even though that’s nominally “picking inheritance.” Because with C++ classes you can define interfaces and compose those objects better than you can with just functions and structures in C (no callback functions and void pointers, thank you).

    So it’s about the ergonomics of the language, and I think we as developers are collectively growing and exploring, figuring out what works and what doesn’t, and with Rust and Go we’re trying out those traits and interfaces we figured out in object oriented languages without dragging along classical inheritance. Given another 5, 10, 20 years, I’m sure we will have figured out what doesn’t work in Rust and Go and see new languages dropping those concepts in favor of newer, even more ergonomic ones.