DOT4 supercedes DOT3 and is compatible with DOT3 fittings, it has a higher boiling point; an upgraded chemistry, use DOT4.
Even DOT5 (silicone based) is compatible with most systems except in the case where silicone rubber external components such as caliper piston boots, which are attacked by silicon fluids and greases. Having said that it is not miscible with DOT3/4 and as a result should only really be used where its been used before or the system has been COMPLETELY changed. So although in theory it would work, in practise its not worth it.
DOT5.1 is miscible with DOT3/4 so can be mixed and it has an even higer boiling point, but its not silicone based so the name is highly stupid, the 5 suggesting its got something to do with DOT5.
The more water in the fluid the lower the boiling point becomes, this is why the fluid should be changed every couple of years.