Moving the kernel to modern C
Moving the kernel to modern C
Posted Feb 27, 2022 14:50 UTC (Sun) by deater (subscriber, #11746)In reply to: Moving the kernel to modern C by camhusmj38
Parent article: Moving the kernel to modern C
There are real reasons to avoid operator overloading.
When doing system or embedded work it can be disastrous (for both performance but possibly also correctness) if what appears to be a standard operator that should map to a handful of assembly operations instead turns out to be a complex function with unknown side effects.
This can also be a problem when reviewing a patch, and it can be unclear from the small amount of context whether an operation is overloaded or not.
I suppose then the argument is that you should only view code in an IDE environment that requires 4GB of RAM and a full GUI interface and be sure to hover over each operation and offload all your thinking to a program written by someone else. Sometimes newer/flashier ways of writing code aren't necessarily better.
