At some level, basically everything digital is based on PWM… just sending square waves through electrical circuits, 1s and 0s, on and off. The important part is the details, what they do with it and how.
Most of the good stuff keeps the digital parts inside, and converts to/from analog when interfacing with the user. Typically this means turning something on and off fast enough to produce something in-between when it goes through an analog component to smooth out the signal.
For PWM style flashlights, that analog component is your eye. And … that’s not a bad thing. It works pretty well, as long as it’s done in a way which doesn’t register on maukka’s “snob index” meter. It mostly just needs a reasonably high frequency.
The “PWM is bad” thing comes from poor implementations, where the digital part is visibly digital… where the pulses are slower than the response time of an eye. It’s like the flashlight equivalent of a low-res pixelated image. It doesn’t mean all digital images are bad… just that that particular picture is. Instead of looking like the thing it represents, it just looks like a bunch of colored squares.
OTOH, it isn’t just digital systems which do this.
What people are seeing and disliking is quantization. The thing is, everything is quantized. It’s just not usually visible. At least, not without specialized equipment. Look deep enough though, zoom in far enough, and eventually you’ll see the pixels (so to speak). It seems that nothing is truly analog.
That’s one of the biggest and most fascinating discoveries of the past century or so – that everything in the universe seems to be quantized … or rather, quantum. Look close enough, and everything is digital … in a sense. Maybe not strict 1s and 0s, but at least discrete – distinct states which apparently can’t be smoothed between.
Like, make an electron go from its 4th to 3rd energy state, and it emits a single indivisible unit of energy, a photon, like a “bit” in a computer transmitting a single “1” in a sea of zeroes. It’s the universe’s smallest, highest-resolution PWM. When that bit hits something, like a particle in your eye, it briefly raises the energy state of that particle, from perhaps the 4th to the 5th level, and triggers a complex response which eventually is perceived as vision.
Do this more, and the perceived brightness goes up. But it’s not smooth, in a strict sense of the word… much like how a beach isn’t technically soft. The beach is made of many hard, sharp, tiny grains of sand… and only feels soft in aggregate. The same applies to lights, where brightness may feel smooth or steady, but only because the individual pieces are too small and too fast to perceive.
Bad PWM is like a beach made out of big, sharp rocks. It doesn’t feel soft because the pieces are too big. It’s otherwise not really all that different than a soft beach though… it just doesn’t have high enough resolution to feel good.