Google takes every opportunity to express its support for a culture that embraces diversity and inclusion. As CEO Sundar Pichai recently said: “We strongly support the right of Googlers to express themselves.”

Well, as it turns out, not so much.

Google terminated an employee this week for writing a memo that expressed dissatisfaction with the company’s political culture and criticized its gender diversity efforts.

Google fired James Damore after his memo sparked an uproar on social media, where the document was characterized as a “screed” and a “tirade.” Some reports claimed Damore concluded that women in general are “unfit” or “genetically unsuited” for technical work and called the memo “anti-diversity” — none of which is true.

Here’s what Damore said: “I strongly believe in gender and racial diversity, and I think we should strive for more.” He faulted Google’s approach to getting it done. Damore argued that the reason there aren’t as many women in tech isn’t so much about bias or discrimination, but instead to the innate differences between men and women.

Where Damore erred is stating those differences are biological, rather than sociological or environmental, and in making sweeping generalizations about personality traits and interests. There is zero science to support the biological claims. Considering Damore’s background in biology, he should know better.

Still, even Google CEO Pichai acknowledged that “much of what was in that memo is fair to debate.” And he’s right. The explanation for the gender gap in technology starts much earlier than the workplace. Despite the fact women make up 57 percent of those enrolled in college, they comprise only 20 percent of those enrolling in computer science programs. That’s down from 37 percent in 1984.

That decline may explain why women hold only 19 percent of the tech jobs at Google, despite the company spending $265 million since 2014 to recruit a more diverse workplace.

A joint study last year by the management consulting group Accenture and the non-profit Girls Who Code found that girls’ interest in computing peaks in middle school with an estimated 64 percent of female middle schoolers expressing such an attraction. That interest falls sharply in high school before rising a bit again in college.

The study argues it is critical to encourage interest in high school to broaden interest in college.

Another initiative, this one called BRAID (Building, Recruiting, And Inclusion for Diversity), launched in 2014 to increase undergraduate computer science enrollment among women and minorities. Its strategies — which include tailoring introductory courses to those with no computer experience or negative concepts of computing — helped schools such as the University of Washington increase female enrollment from 19 percent in 2007 to 33 percent in 2015. The Harvey Mudd College in Claremont, Calif., another BRAID beneficiary, saw its enrollment by women increase from 12 percent in 2006 to a whopping 47.5 percent in 2016.

These are positive and important steps. To inspire more movement in this direction requires an open dialogue where people aren’t afraid to point out shortcomings and express an opinion for fear of losing their job.

If Google’s CEO really believes much of what was in the memo “is fair to debate” then why not have that debate? Admonish Damore for his sloppy and insulting biological theories but allow for a deep dive into the lack of gender (and racial) diversity that goes beyond societal norms.

It would be far more productive for everybody — including Google — to encourage these debates and discussions rather than shutting them down.