You know, I started to think, "How can he even compare apples to oranges like that?", but I have to reconsider... The DA*16-50 was one of the first lenses I bought when I decided on the Pentax system, and I loved it! But now, if I want something
wide, I usually grab the DA12-24, and the 16-50 has become pretty much an orphan. (The 12-24 plus DA*50-135 makes a pretty darn good two-lens travel kit on most of my trips!) Something like the 40 (or I might go for the 43) would actually have been a better choice, in the long run. (Of course LBA has been a factor as well!

) So my two cents, I would also recommend the prime. Good luck in your choice.
P.S. Haven't owned the 40 so can't compare, but I will say that the 16-50 has better IQ than my Tamron 28-75, which is also highly regarded by many forum members. My only minor complaint with the 16-50 (which is to be expected) is distortion at the wide end. Helluva lot bigger and heavier than a 40, that's for sure! It is a good, useful, lens though.