That assumes the OOM killer kills the right thing. It may well choose to kill something ancillary, which causes your OOM program to just hang or misbehave wildly.
The real danger in all of this, swap or no, is the shitty OOMKiller in Linux.
The OOM killer will be just as shitty whether you have swap or not. But the more swap you have, the longer your program will be allowed to misbehave. I prefer a quick and painless death.
The real danger in all of this, swap or no, is the shitty OOMKiller in Linux.