The crowd that filled Sheffield-Sterling-Strathcona Hall on Friday to listen to Jonathan Safran Foer was not throwing hamburgers — though the 33-year-old bestselling author of “Everything is Illuminated” said he was expecting just that when he started giving lectures about his new nonfiction book, “Eating Animals,” which discusses arguments for vegetarianism.

The event, sponsored by the Yale College Student Animal Welfare Alliance and supported by the English Department, focused on the perils of factory farming and the need for more humane and environmentally friendly agriculture alternatives.

Thoughtful from a young age (Foer later majored in philosophy at Princeton), the author, who is a vegetarian, said he suspected first as a child that there might be something sinister about eating meat.

“Like a lot of kids, I had instincts about eating animals,” Foer said. “You’re told bedtime stories that have animals as heroes and given stuffed animals when you’re crying. I can’t imagine a household where it would be acceptable to abuse the family pet. But there’s a cognitive dissonance in the explanations parents give for why it’s OK to eat meat. I think a lot of kids can smell the bulls— in the explanations.”

This instinctive urge aside, Foer insisted he is not an “animal person” and that his decision to be a vegetarian and his criticism of factory farming are mainly environment-based.

“We now have a farm system that has gotten so bad that we only need to appeal to the values that we all share to reject it,” he said, citing a United Nations report that said factory farming is the number one cause of global warming.

Foer also spoke about the health consequences that result from the treatment of animals on these farms, pointing out that swine flu originated on a hog farm in North Carolina and that more than 95 percent of chickens are infected with E. coli.

Most people have images of grass, humans, fence posts, sunshine and animals when they think about farms, Foer said, adding that this image corresponds only to what farming was like 50 years ago. Today, he said, animals are raised in high concentrations and indoors. Most never see sunlight and are routinely abused, he said.

“They’re fed various drugs from birth until death,” Foer said. “They’re all the same genetic types, which we know are more likely to be ill.”

Foer opened and closed the talk on a hopeful note — saying that 18 percent of university students now describe themselves as vegetarian. He added that college students are the most open to change and that they are one of the most influential demographics in the country.

Justin Haaheim DIV ’10 said he thought the talk was “fantastic” but that he was frustrated with the moral tact Foer took.

“He seemed to be saying that becoming a vegetarian is a really morally clear decision, when in reality, he himself is embroiled in all sorts of moral ambiguities,” Haaheim said. “For instance, he may be a vegetarian, but he flies planes to all of these events [which also harms the environment].”

As a climate change activist, Haaheim said cognitive dissonance is not unique to issues of vegetarianism and animal rights.

Patrick Cage ’14, who said he read “Eating Animals” because his girlfriend — a fan of Foer’s fiction — gave it to him for Christmas, said he preferred it to other books about the meat industry because of its philosophical and humorous edge.

Foer taught a writing workshop at Yale as a visiting professor in the spring of 2007.