These are two very different guns.
The Raffin requires you to either tap-burst or burst it. It is accurate and deals damage for a silenced gun.
The XM8 allows for quick kills. You can still full auto it and also deals heavy damage. It has barely any recoil and the spread is decent.
If I was to choose, I would use an XM8 over a Raffin unless I feel like using a silenced rifle.