Try Haxe 14 years ago
Only when you want to perform specific actions (Or are writing a cross-platform lib which may need itself to perform platform specific actions)
In the usual case of using already written cross-platform libs you'd rarely need to do this.