You don’t get code without people, and the industry is finally realizing that it’s a net negative to have an asshole who produces great code but scares away more productivity than they bring.
What's new here is the benchmark for "what counts as an asshole". If you need to watch every single word in fear of giving anyone the opportunity to cry 'offense' and invoke a CoC panel on you, that's when all trust in the room goes out the window, and when you really start flushing productivity down the drain.
So, not a net positive in my view.
But there are so many other effects that it is still unclear to me wether, at the end of the day, CoCs attract or detter coders from joining / staying with a project.
I've often found myself fighting the macho/childish/exclusive culture around tech, yet the reliance of formal CoCs to police our attitude have made me feel uncomfortable. I guess I'm not the only one.