Electric instantaneous water heater is probably not an option for your house. ( You don't have enough power to make it work or enough money to pay the electric bill).
Gas instantaneous water heater could work well in an ideal situation.
To replace a conventional gas water heater with a tankless one you need to:
1) Increase the size of the gas line
2) Add a dedicated circuit for electronic ignition
3) Install a special flue
4) Schedule when you want to take showers and do dishes or laundry
Tankless or instantaneous water heaters are based on GPM (gallons per minute). How many gallons can a water heater raise from 60F to 120F. Typical tankless heaters do it in about 9 GPM.
Pros:
No heating of stored water (energy savings)
Cons:
Expensive (cost of equipment and upgraded installation)
Is not conducive to American lifestyle ( doing dishes, laundry and shower at the same time)
My personal opinion:
Excellent application would be for a 1 bathroom apartment, town home, condo as a new installation. It is almost cost prohibitive to replace an existing water heater with a tankless one. Although energy rates vary around the country here in California natural gas is way cheaper the electricty. Heating water with electric elements is insane. With tankless the power needed to heat water would be astronomical. I couldn't even afford it
SF Bay Area prices the flat rate cost to swap out a 40 gal gas water heater will be between $1500 - $2000. To swap a 40 gallon heater with a tankless (Rinnai
http://www.rinnai.us/, Takagi
http://www.takagi.com/etc.) $4000 - $5000. You can pay for ALOT
of natural gas for the difference and still enjoy the flexability of an tank heater.
If you REALLY want to be green:
Install a tankless or two (one at each end of the house) and supplement with solar panels. It will take many years to recoup the installation cost but you will feel good about it.
If you're frugal:
Replace you old 40 with a new 50. Same gas consumption, few more gallons, and thousands more in you're pockets not mine.