NO CHILDREN's author of the past 30 years has regularly sparked more controversy than Roald Dahl, who died last November at the age of 74. On the one hand, kids consistently name him their favorite writer; on the other, our best critics maintain that his books are larded with gratuitous violence, bigotry, sexism, vulgarity, greed and all manner of foulness.

This division of opinion over Dahl the artist also extends to Dahl the man. During his bfe he steadfastly endured a great many sorrows. An heroic fighter pilot during the Second World War (five confirmed kills), he was so severely injured in a crash that doctors had to pull his nose out of his face to reshape it; he suffered from headaches and back problems for the rest of his life. His beloved daughter Olivia died of complications from measles at age 7. His only son Theo was struck by a speeding taxi while an infant and suffered multiple head injuries that left him partially disabled and hydrocephalic. His first wife, the actress Patricia Neal, was felled by three massive strokes. Through all these trials, Dahl responded with an undaunted stoicism that was almost cheerful, co-inventing a device to help his son, organizing home therapy for Neal, contributing his time and money to various health groups and charities. He was by all reports an exceptionally charming man, an entrancing storyteller, knowledgeable about wine, painting, the novels of Ed McBain, and greyhounds. He answered all his mail personally, and he received mountains of it.

And yet, this same cultivated and loving paterfamilias carried on a longterm affair with one of Neal's best friends. He publicly asserted that Salman Rushdie merited no pity, indeed was little more than an opportunist who knew what he was doing by writing The Satanic Verses and deserved what he got. Worse yet, Dahl spoke so vehemently at times against Israel that his anti-Zionism could hardly be distinguished from anti-Semitism.

So, concerned parent, what do you do when little Emily or Nathaniel comes home from the library clutching Charlie and the Chocolate Factory?

Let's start with the easier matters. Dahl's personal beliefs, whether agreeable or reprehensible, only matter insofar as they enter his work. That Lewis Carroll enjoyed photographing little girls in the nude is merely an interesting non-fact, until it better helps us to understand or appreciate Alice in Wonderland. Of course, this high-minded esthetic separation of work and creator can be difficult to maintain in Dahl's case if one is Jewish or married to a cheating spouse. Still, our dealings as readers are with books not authors.

Certainly, much of Dahl's fiction (not all: see the light-hearted The Giraffe and the Pelly and Me or Esio Trot, for instance) reveals a Hobbesian world of savagery and violence. The hero or heroine is typically an intelligent, sensitive child, often motherless or orphaned, heartlessly victimized by cruel and barbarous adults. James, in James and the Giant Peach, slaves for his avaricious aunts, who constantly abuse him verbally as well as physically. Matilda, the genius 5-year-old heroine of Dahl's last bestseller, lives with brutish and uncaring parents; the headmistress of her school is a sadist favoring a paramilitary uniform and jackboots. The Twits pull cruel tricks on each other (worms in the spaghetti, attempted murder by balloon) and torture pet monkeys. The Witches verges on a general misogyny.

Sounds pretty grim, doesn't it? But undercutting all this horror is Dahl's sheer jauntiness. The spirit in the books is that of Dickensian grotesque, laced with a rowdy fabliau gusto. The action moves speedily, the sentences are perfectly cadenced for reading aloud, and the wicked are clearly fantastic caricatures, exceptionally nasty super-villains so that the hero's ultimate triumph may be all the more satisfying. Dahl portrays a not quite real world with absolutely impossible creatures in it. If headmistress Trunchbull were real, she would belong in prison or a mental hospital; in fact, she is a cartoon figure; think Bluto, think Goliath, think any number of wicked witches and stepmothers. The threat of her torture device, the Chokey, may sound inhuman, but surely I am not the only child to have grown up hearing about the fiendish contraption in the principal's office called The Paddling Machine?

Moreover, Dahl generally delivers comeuppance to his villains without making the heroes morally responsible. The nasty children ignore Willy Wonka's repeated warnings. The Giant Peach, not James, does away with the wicked aunts. The witches drink the mouse potion they intended for the children of Britain and are then killed by hotel staff. Fantastic Fox simply leaves the the armed and vindictive farmers Bunce, Boggis and Bean stewing in their own meanness, eternally waiting outside his hole. Even the Twits simply indulge in the same childish physical humor made famous by the Three Stooges and Roger Rabbit.

Some people may be offended by grossness. For instance, Mr. Twit has bits of food in his beard, which he periodically sucks on for extra sustenance. Kids, though, are natural Rabelaisians. Where Dahl's grown-up stories go in for bawdy humor (the sperm collecting in My Uncle Oswald), here we have body humor. Flatulence, belching, smelly feet, mock-vomiting and similar behavior make up the rude comedy of childhood and Dahl doesn't flinch from describing it. As Matilda says, "Children are not so serious as grown-ups and they love to laugh." There is, by the way, nothing overtly about sex in the books at all.

It might, though, be construed as beyond bad taste to have The Big Friendly Giant (of The BFG) talk in a fractured English similar to that of a stroke victim -- until you remember that Dahl created a method to help stroke sufferers. Then you rather admire the ruthless artistic economy: all grist for the mill. The BFG's actual language is inventive and delightful. His sole source of nutrition, you may recall, is "the disgusterous . . . snozzcumber," a prickly tuber that tastes of "clockcoaches and slimewanglers."

No, having read or reread most of Dahl's books over the past few months I find that the only ones that really bother me, from a moral standpoint, are the two Charlie books, especially Charlie and the Chocolate Factory. As critic Eleanor Cameron first pointed out, the Oompa-Loompas, transported from Africa to run the chocolate factory, reveal virtually every stereotype about blacks: They constantly sing and dance, work for low wages, are made the subject of scientific experiments, etc. Michele Landsberg has further suggested that the millionaire father of Veruca Salt is a Jewish caricature, and that the chocolate factory itself is analogous to a death camp. Other critics have felt that the grandparents are treated like children, a clear instance of ageism.

All these elements shocked me much more than the clever ways that the spoiled children are -- temporarily -- disposed of. But I wonder if critics would be so harsh on the rest of Dahl's oeuvre were it not for these repugnant elements in Charlie, elements he tempered in later editions of that book? After all, to be a great children's author requires the taking of risks: Maurice Sendak was attacked for the nightmarish quality of his Wild Things and for plainly showing Mickey's penis in In the Night Kitchen; Robert Cormier dared to have the heroine of After the First Death killed by terrorists; Alan Garner has been called too literary, too morally complex for kids. This is not to excuse Dahl, but I think we wrongly expect children's books to be more clear-cut, ethically and artistically, than adult books. We can be entertained and disgusted, feel assent and disagreement at any age. Hence no one should stop boys and girls from reading about Charlie, but it is important to talk to them about the story, the nature of prejudice, and the uses of fantasy and caricature.

After all, the Dahl oeuvre does offer superlative storytelling, with an especial expertise in evoking the terrors of childhood. Who can forget the shock when Sophie is snatched from her bed by a giant hand? Or the dizzying disorientation that accompanies the revelation that one's own teacher, the very person reading aloud to you, may herself be a witch? Still, I personally find Dahl's plots weak (surprising since he's a master craftsman in his macabre stories for adults; think of "Lamb to the Slaughter" where the murder weapon is gotten rid of by being eaten by the investigating police). The early books simply chronicle a succession of events: a Jules Verne-like travelogue in James and the Giant Peach, an Agatha Christie "And then there was one" for Charlie and the Chocolate Factory, Mr. Fox raiding, one after the other, three strongholds. But simple though they are in structure, the stories obviously satisfy children.

Should Roald Dahl then be given a clean slate? I really don't know. There is a sourness and brutality to his work that bothers me. He shows an excess of savagery that one can't simply dismiss as the spirit of carnival, or of being true to juvenile fears. And what of all the eating in his books, their constant orality? There is more here than a book critic can quite fathom. One can't help but wonder if Dahl's years in a harsh prep school (chillingly related in Boy) and as a British colonial officer in Africa helped foster a warped Manichean view of kids vs. adults, of us vs. them.

For me, then, Dahl remains the Evelyn Waugh of children's books -- compellingly readable, deeply disturbing, outrageous, manipulative and witty. In short, his stories resemble Mr. Willy Wonka's luscious chocolates: They taste great, but they're not really all that good for you. And yet I still like them. Sort of. Michael Dirda is children's book editor of Book World.