The 40mm f/2.8 lens is a heck of a deal, but the 35mm f/2 IS is in a very different league. When my 8 yr old daughter wants to go out and explore the joys of photography, I send her out with my old 5D classic and the 40mm pancake. The body is a bit big for her hands (I don't have a smaller, cheaper model for her to use), but the pancake is small, light, and easy to use. I don't personally have much of a use for it, but the 35mm IS would be something I'd use often. That whole f stop advantage the 35mm lens has makes a big deal in low light environments.
yes. they are both very very different lenses. Personally, I don't use my 40 pancake that much. even if you don't need the IS, I'm very particular on ergonomics. it's going to be much easier to use for manual focusing and USM is faster than the STM motor. and the wire-focusing thing... I really don't like that much. It's small, light, and cheap. If you don't need the smallest of lenses, the 35mm is really a great lens.