Which is kind of how it has worked with cars, except I find that more and more cars have a style of horn that's hard to control with the necessary precision. Maybe this is Canadian culture but I get very anxious that my horn will honk for a millisecond too long and the poor victim will think I'm angry at them.
As an experiment, I've found that you can reliably detect the presence of crummy horn control by trying to pulse the horn for the shortest amount of time possible. The shorter my push on the horn button gets, the more likely it is that the timing will feel wrong somehow, or the horn doesn't even sound at all.
I've definitely tried friendly beeps at friends or neighbors and it came out sounding like an angry honk.
adding on a wave helps too; I wish more drivers waved...
It feels dangerous to be unable to see the driver through their side window (eg. 4-way stop eye contact on who goes)
I've taught my kids when crossing the street to make eye contact with drivers to make sure they see you. Drivers with smartphones unfortunately add to the challenge.
Which, IMO is important. Even if they aren't in your way, it can help avoid an accident. If you're on any sort of nicer, well maintained road bike, it's going to be near silent. I've startled pedestrians on mine, so I now ring my bell every time I'm approaching someone, not as a "get out of my way" signal but more of a "hey! I'm coming up behind you, don't get startled and jump into my path"
Generally though, if its a particularly crowded path, I just ride in the road. In stop and go city traffic I'm usually going as fast if not faster than traffic anyway.
Now that I moved to the country with a comprehensive rails-to-trail network, I thank all the cyclists that use the bell to let me know they're coming up behind me. What really irks me is the dudes going 30+mph silently coming up behind me, passing less than 2' from my dog (who is at my side) when there's PLENTY of room to give me space. No, we can't hear them coming all the time. Yes, it's startling, rude, and dangerous for all of us.
An ancient gas-e-bike rating is allowed on them outside city limits but iirc those bikes are exceedingly rare since even before e-bikes became truly mainstream.
On the other hand, I've been angered by dog owners when running who just take up the entire pavement. A couple of weeks ago, I had one guy coming towards me force me to come to a complete stop when I was running flat out, because he couldn't be bothered to control his dogs. He was in the centre of the pavement, and the 2 dogs were at the extreme edges with tight enough leads between him and the dogs, so it'd have tripped me up if I'd tried to jump them. He knew full well I was heading that way, but in the 10 seconds since we had made eye contact, he was clearly determined not to reign his dogs in, and it was only when I was stopped and so he had to reign them in to continuing walking past that I was able to keep using the pavement.
As far as the pedestrian's safety is concerned what matters is either giving them a wide berth or slowing right down when passing.
Whether on a bike or not I'm sick of all the modern world's beeping and ringing and buzzing and blaring and if I'm wearing noise cancelling headphones that means I don't want to hear it. Don't tell you're being annoying for my own good because you aren't.
Considering that the persons involved can't be expected to not be deaf, or functionally so via e.g. headphones, and thus you always have to be able to brake anyways. Running onto a driving lane (be it bikes or cars doesn't matter) without looking especially if the direction you didn't look just gave an audible warning is always reckless.