Re:I stopped everything and started writing C again
by j-krieger on Thursday March 13, 2025 @11:20AM
(#43354238)
> after sufficient practice, I became good enough to start avoiding those pitfalls.
You can only do that in code you control. You can not control the entire call stack of your functions in cooperative environments.
Re:I stopped everything and started writing C again
by WalterBright on Thursday March 13, 2025 @12:05PM
(#43354655)
> You can not control the entire call stack of your functions in cooperative environments.
That's true. But I try by doing code reviews, and I try to lead the team by example and suggestion.
Re:I stopped everything and started writing C again
by j-krieger on Monday March 17, 2025 @10:12AM
(#43388823)
Examples and suggestions don't transmit your years of experience of pitfall-avoidance. You say you "try" to do code reviews, which is honorable, but also proves that there is code in your codebase that you can not and do not control, and which likely features unsafeness. This is fair enough, we can't do all the work as maintainers after all.
When I `git blame` segfaults in the D compiler repository, the aforementioned assumption -- that you can't control faults introduced by someone else -- seems to be largely true. We do use Go/Rust at work (albeit an easier flavor of it), because I don't trust my juniors.
It's not all that different from learning any challenging task. I can't skateboard to save my life, but the fact that people can do it well is both admirable and the result of hundreds or thousands of hours of practice.
Skilled people can sometimes forget how long it took to learn their talent, and can occasionally come off as though the act is easy as a result. Don't take it too harshly.