Arduino vs Raspberry pi. Programming language and capability?

The Pi is a computer.
Arduino is a microcontroller.

There is no competition - the Pi is the more capable machine. However if you're looking to make a CNC machine, I'd suggest arduino.

This is because of simplicity -- you don't need a full powered computer for that -- It just makes things more complex.