With air conditioners, my opinion on repairing depends on the type of refrigerant used. In general, if the air conditioner is using the older expensive (and continually getting more expensive) refrigerant, I am more likely to just replace the whole system. If the newer refrigerant is used, I am more likely to repair.
For what it's worth, I replaced the compressor on my older AC system about 5 years ago, and the system is still going strong.