Why not just tell people never to swim? There are never "no waves" when you are at an ocean beach. These sorts of absolutist rules of thumb are of no benefit to anyone but the people offering them up.
People will go swimming in the ocean and in all myriad of bays and estuaries that are more than capable of having enough surf to kill them depending on the weather. You just need to exercise good judgement about how much surf is too much.
It is fairly safe at most public beaches if:
* you follow the posted signs for rules (e.g. where it's safe to dive, staying in marked areas), flags for current conditions
* pay attention to weather conditions
* know (roughly) when and how much of a change the tide will bring
Unfortunately, a significant number of people don't follow the rules, or underestimate the risk.
There is a reason many public beaches located within an urban center have lifeguards and patrols.
People will go swimming in the ocean and in all myriad of bays and estuaries that are more than capable of having enough surf to kill them depending on the weather. You just need to exercise good judgement about how much surf is too much.