You are required to use the white in a cable as the hot on a switch leg if you are using it as an ungrounded conductor and since 2002 or so you are required to reidentify it with tape or other method. 200.7(C)(2)
The thinking is the return from the switch will be a "phase" color when it gets to the luminaire. Then the installer will be presented with a white neutral and a phase color for the ungrounded conductor.
It can get a little confusing when you are on the supply end tho. That is why they started requiring reidentifying the wire.


Greg Fretwell