I've recently taken delivery of an 840d coupe and its pretty special, inside and out. I think if you sat in them both you'd prefer the 8 although the M340 would be quicker unless you had the 8 remapped. The boys at DMS automotive offer 400+ bhp & 740 NM torque, with AWD its rapid but will return over 500 miles out of a tank.
I haven't driven the M340 but if you needed back seats and you're worried about what a car is going to be worth after 5 years then you'd have to nod the M340. If you want the best all rounder have a remapped 8, you wouldn't be disappointed but then i doubt you would with a M340i.
Just my two pence worth.