Earlier quoted context omitted.
Offering a different point of view helps either confirm their decisions or open up avenues for improvement of their work. It’s not about telling “this is how I would do it” but rather “Have you thought about other options and approaches? What do you think? Why did you choose this route?” helps the individual weigh the pros and cons with each. It should never be an opportunity for you to chime in with how you would ha…
to be clear, I fully agree with this and your broader point. It's the specific verbiage in your first example that I think is problematic, mainly because it feels disingenuous and insincere at best, manipulative at worst. Which is highly unfortunate because I think the vast majority of the time the motives are pure!
It leaves open the possibility that you as the reviewer are actually mistaken, and they possibly have a good reason for doing it that way.
I may be the senior reviewing the junior’s code, but they probably spent longer looking at the problem than me and there is a chance that I’m missing something. By suggesting “have you considered this, it may be able to handle x situation better”, you respect their work more.
It depends on context though, if somebody clearly just didn’t understand something obvious, then I’ll just tell them directly.
Either way, probably a difference in our opinions of feedback, you might prefer more directness than me