Originally posted by mikeSF im so proud of my brethren for not uttering the "p.d." phrase.
Well, not until you brought it up. ;-)
In all seriousness, I can't see these two lenses being compared, since they have such different focal lengths. I would pretty staunchly disagree at this point that the 77 is for niche purposes only, but that seems to be the popular thing to say here. In any event, I disagree. The real question is whether the focal length would suit your purposes, and there is no denying that the 40mm will be better suited to doing more things decently well than a short-moderate tele like the 77.
That certainly doesn't make it better, but at a fraction of the cost of the 77 it also makes it much less of a gamble. :-)