Maybe it was the thumping music, the alcohol or the beating sun, or some hallucinatory combination, but for a moment in early July, it appeared as if a waterfront state park in Williamsburg, Brooklyn, had turned into a smoker’s paradise.

Bikini-topped women and sweaty guys in muscle tees were puffing away as they danced at a techno party hosted by Verboten, a roving nightclub. The surgeon general might have had a stroke.

One of the revelers, Howard Wang, 28, an information technology consultant from New Jersey, took a deep drag in apparent disregard for the law and decades of antismoking campaigns. But on closer inspection, he wasn’t puffing a Marlboro but a Bedford Slim, a brand of electronic cigarette marketed to the skinny-jean set.

“It’s the future,” said Mr. Wang, who does not classify himself as a smoker. “It’s like when you watch ‘Tron’ and they’re smoking something like this.”