what will happen if i play 4way games using an 8way stick?
Mame does exactly ignore diagonals. (The default is) If you're pushing left, and move to diagonal up/left, mame will translate that as up. This is okay if you're moving the stick from left to up and pass through up/left, bad if you're not. The bigger a joystick's diagonals, the harder it is to stay in one direction, since diagonal always is treated as a change to the new direction.
Here's a illustration of this going on. Left pic is 8-way joystick pressed left and what mame would translate if it moved to any of the 7 other directions (grey being random). Middle pic is when the stick is moved to up/left diagonal and what mame would see if moved to any of the 7 other. Right pic is stick pressed up. Notice the changes in the directions the diagonals go through.

Diagonal from center picks one of the two directions at random.
Of course, you can use cfg or ctrlr ini files' "NOT" to get around mame's 8-way to 4-way translation. Of course, it's not exactly like a real 4 way. Three possibilities:

That's why people have 8 & 4-way joysticks.