The 40mm f2.8 STM is the first pancake EF lens that Canon makes, and it was the first to employ the STepper Motor (STM). This pancake lens is a huge success, judging from what the owners have to say; it's almost universally praised, and deservingly so.
Aside from it's petite size, the low price is a major contributing factor. When on sale, it can be had for about $150 CAD, although the price has gone up somewhat since the Canuck Looney has depreciated quite a bit against the mighty US green buck, but the price is still very reasonable. A third reason why it's so popular, is because it's optically excellent.
Canon EF 40mm f2.8 STM on A7 with Commlite Smart Adapter
I got mine when I bought the used Canon 5D II as a bonus. The 5D II is long gone, but the 40mm f2.8 STM remains. This is one of the few pancake lenses I have. The other two I often is the Pentax 40mm f2.8, and the Contax Carl Zeiss 45mm f2.8. All of these lenses are optically competent.
When used on the Sony A7, the tiny size is no longer very tiny when it's mounted on the Commlite adapter. In fact, the adapter is thicker than the lens itself. Still, the combo looks quite compact on the A7. Of all the Canon AF lenses I have tried on the A7, this one works best, but not perfect.
The Autofocus speed is workable, but slow. The A7 II and A7R II are better bodies to use for Canon lenses since they can use the phase detect pixels on the sensor to drive the lens to focus at a much faster speed. On the A7, or any other E-Mount or NEX mount cameras, it's definitely not for moving objects.
Lone Tree in Snow - Canon EF 40mm f2.8 @ f8 & Sony A7
There is one bug with the CommLite adapter when used with this lens. The maximum aperture is often stuck at f3.2 and can not be opened up to f2.8. Sometimes it can be fixed by turning the camera off and back on, but in severe cases, the lens needs to be removed and re-mounted, or battery removed and re-inserted. At odd times, it fixes itself. How weird.
In terms of optical quality, there is very little to complain about. The lens is very sharp even at full aperture of f2.8, to the corners. I can't say the same thing for the EF 70-200mm f2.8L IS, although we are comparing apples and oranges, if you look at the price difference, the 40mm f2.8 pancake is a bargain for the quality it produces.
The lens can focus really close, to 0.3 meters, but AF doesn't work all the well at close range. It's easily fooled with the background. Full Time Manual (FTM) focus does not work at all, this means you can not focus the lens when it is set to AF after you half pressed the shutter to fine tune focus. You can either focus by hand, or the lens focuses itself, but not at the same time.
Fiery Sunset - Canon EF 40mm f2.8 & Sony A7
If you shoot Canon, this lens is a no brainer, and if you own a A7 II or A7R II, it's also an excellent buy, since Sony does not make something like this. If Sony has lenses like the 40mm f2.8 STM, and the 50mm f1.8 STM, it will help Sony sell a lot more full frame bodies. Not everyone can afford or want the Zeiss 55mm f1.8 ZA, or the 35mm f1.4 ZA. What Sony lacks, is affordable line of full frame primes. Ironically, their A7 II and A7R II cameras work so well with Canon (and Nikon) AF lenses that people may never buy another Sony lens. That also makes it easy for them to switch back to Canon/Nikon when they introduce cameras with compelling features. I know that if I had an A7 II or A7R II, I would definitely buy the Canon 50mm f1.8 STM in addition to this 40mm f2.8 STM. I would also buy the Sigma 20mm f1.4 Canon mount if I need a fast wide prime. In a way, this solves the lens problem with Sony.
Chained - Canon EF 40mm f2.8 & Sony A7