You asked
Pentax hd da 40mm f 2 8 limited vs pentax smc da 40mm f 2 8 xs?
Pentax HD DA 40mm f/2.8 Limited and Pentax smc DA 40mm f/2.8 XS are both 40mm f/2.8 primes for Pentax K-mount APS-C cameras, and the guide lists the same specs for each. On a K-series APS-C body, either one frames like 60mm on full frame, and f/2.8 gives about the depth of field of f/4.2 there. The guide's focal length converter explains that crop-sensor maths.
The difference the guide draws is size. The Limited is a pancake that keeps the camera small. The XS is an ultra-thin pancake, slimmer still. The guide gives no optical difference between them, so don't expect the XS to be sharper or the Limited to be faster. Both are f/2.8, not stabilised, and autofocus.
For most people, the XS suits a camera bag that needs to stay as compact as possible. The Limited is the pick if you want the pancake form with the "Limited" name, a choice the guide's pages don't otherwise weigh. Neither is a low-light lens: f/2.8 is modest in dim scenes, and the guide's portrait advice suggests a 50mm f/1.8 if you mainly photograph people indoors.
The guide doesn't list prices on these pages, so check each lens page's price section for current figures before you buy.
Written by Claude from this site's pages.
From these pages
This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.