Sex is like crushed red pepper: guaranteed to add heat and spice to recipes that would otherwise be as bland and boring as unflavoured farina. Consider this dull economic dictum: "Service workers who enjoy their jobs generate more enthusiastic (and lucrative) customer response than workers with a bad attitude."

How obvious! A rude, unfriendly waiter gets smaller tips from diners. Even writers like me wouldn't land decent commissions if our every pitch to an editor carried the undertone "I hate you, Guardian. I loathe writing for you, and I'd never do it if I didn't have to support three kids and a cocaine habit."

No one would deny that "attitude matters" regarding waiters or writers, but observing that a sad and desperate prostitute makes less money than a happy, confident one – as authors Steven Levitt and Stephen Dubner do in their new tome Superfreakonomics – generates a controversy that would never exist without that peppery red sex addition spicing up the farina.

My own take on sex work is arguably more liberal than the norm, since I spent my youth working somewhere between waiter and hooker on the service-industry spectrum: to support myself through college and graduate school, I worked as a stripper. (Actually, "exotic dancer" was the preferred nomenclature when I started in the overly religious part of the American south. No actual stripping was allowed – we usually wore spangled bikinis on stage, and not until moving to the staid American northeast did I strip down as far as "fully topless".)

Exotic dancing! What a marvellous job that was for an 18-year-old college student who at the time had few other marketable credentials: doll up, jiggle the twins a bit and make more money in an hour than a McDonald's burger-flipper got all week. The only real downside came from the condescending attitudes of those who insisted that, to avoid exploitation, I should've exchanged my bikinis and body glitter for a polyester uniform and made one-tenth as much money hauling fries out of a vat of oil.

Given the dismal state of the economy and my own finances, I'd go back to part-time dancing this second if I were 10 years younger. Maybe five. I did work at McDonald's in high school, and it was possibly the most exploitative job I've held. Those customers had zero interest in me as a person and viewed me merely as a way to get a piece of meat (with a side order of fries).

There's certainly a world of difference between being a stripper and a prostitute, but both share certain qualities: an unsavoury, sexually charged reputation; the chance to make far more money than the "respectable" jobs generally available to such workers; and in both cases, any unpleasant aspects are made immeasurably worse by make-it-go-away moralising. The women who work at legal, regulated brothels in Nevada or the Netherlands are far less likely to be hurt by abusive customers than the illegal prostitutes who fear not only clients but also the cops. And unhappy, desperate, low-paid street prostitutes wouldn't exist if people could work openly in or frequent legal whorehouses, any more than sleazy speakeasies selling blindness-inducing bathtub gin remained in America after we ended alcohol prohibition.

As a dancer I mostly worked in shoddy neighbourhoods but was exponentially safer than any prostitutes in the vicinity, not because I didn't have sex and they did but because my colleagues and I could view cops and security guards as our protectors, not people out to ruin our lives with criminal records.

If prostitution were as safe as any other legal and regulated business, there would be nothing controversial about Superfreakonomics or anyone else saying "The ones who like their jobs do better than the ones who don't." That was certainly true when I was dancing.

One of my single most lucrative nights came when, as soon as I got on stage, I climbed atop the pole and hung suspended several feet above the floor, then called out to the crowd, "I do celebrity impersonations! Free table dance to the first man who figures out who I am." Then, keeping my legs wrapped around the pole, I fell back and hung upside-down, with my eyes closed and my fingertips dangling a foot above the stage, and when the audience gave up guessing I flipped back to an upright position and called out .... wait for it ....

"Mussolini!"

And my God, how the money rolled in. See? Attitude matters.