someone asked this qn in the Canon Equipment forum. i decided the inability of that forum to post images is not going to make the answer as fun, or educational, so i'm posting my reply here.
1. Consumer digicams have smaller sensors, which lead to more megapixels being crammed into their smaller space leading to higher noise in images at all ISOs.
Your friend's S40 / G2 is not going to have less noise in images at ISO 100 than my D30's ISO 400. Period.
ISO 800 example
2. Your friend's S40 / G2 may have more megapixels, but his / her camera is likely to apply a more aggressive compression alogrithm, not to mention the many in-camera processing done on the image captured, giving a highly JPEG with numerous JPEG artifacts, or a RAW file that is not going to be as smooth and clean as any image from my D30.
Points 1 and 2 combined ensured my D30 will alwyas produce consistently higher quality images than your friend's G2 / S40, regarding of megapixels.
3. Greater post processing options. Due to the D30's lack of in camera processing, i can post process D30 images in any way i want - sharpness, contrast, saturation etc to simulate any film types / look. Post processing options with consuer digicams are often limited because so many variables eg sharpness, contrast, saturation are already predefined in camera.
4. Large scale enlargements. Again, D30 images., due to the lack of in camera processing, simply scales up better, with less noise and less artifacts. Consumer digicams can't take much punishment of that sort.
5. your friend's G2 may have a bright F2-f2.5 aperture, but it is never going to give you the depth of field options that a true SLR can give you. Due to the short inherent focal length (7-21mm), everything in the picture will always appear very sharp, and you're never going to get the kind of nice bokeh effects an SLR can give you.
Bokeh Example - BlueStrike with EOS 300
6. With a usable ISO of only 50, (other ISOs produce far too much noise) at most 100, your friend's G2 / S40 is never going to be able to travel anywhere far without a flash. Which means u're never going to be able to shoot available light, in places where you cannot use a flash. Which means it's going to be stuck on a tripod most of the time for low light situations where flash is not desirable, or even practical.
ISO 1600, handheld, f2 examples