I have heard that in countries where malaria or dengue fever are endemic, local residents have built up resistance to the diseases so that contracting them is rare or impossible. Is this true, and is it possible for long-term travelers or expatriates to build up resistance?
Hippietrail suggested making this a full answer, so here you go:
For dengue, the answer is emphatically no. There are four strains of dengue fever, and while getting one of them confers life-long immunity to that strain, each successive infection with dengue of a different strain carries with it a considerably higher risk of either dengue haemorrhagic fever or dengue shock syndrome. You really, really don't want either one. This, incidentally, is why you won't be seeing a vaccine for dengue fever for quite some time - researchers are justifiably concerned that unless they can confer 100% immunity for all four strains, the vaccine will actually increase the risk for severe disease.
For malaria, its something of a harder question based on a number of different factors, but its not something I would ever count on over malaria prophylaxis, even if you were staying very long term.
While I have not heard of any resistance to dengue being developed, there have been studies done over years on genetic resistance to malaria. Note that this is genetic resistance that builds up over many generations, and has been observed in specific tribes or ethnic groups. You aren't going to develop resistance simply by travelling a lot and it would be unwise to forego standard precautions.
That said, what I think you're really referring to is general 'resistance' to mosquito bites (from normal, non malarial / dengue vector mosquitoes) that you'll develop if you travel / stay in those regions long enough. You learn to live with it.
Anecdotal evidence I have been told by various friends and acquaintances who had dengue in the past several years in Mexico is that dengue gets worse each time you catch it leading to dengue haemorrhagic fever when you get it the third time.
I'm pretty sure this is not accurate scientifically though. Read up and ask a doctor to be sure.
In any case you can catch it multiple times and it won't get milder each time.
As for malaria there are multiple species (and probably strains) of the parasite which vary greatly in their severity and risk of relapse so I would assume that having contracted one would not give you immunity to the others as the very minimum. I would suggest again reading up online and asking a doctor if this is a risk you are likely to actually face.
The only time I was in a malaria area was on the coast of Honduras about five years ago and I seem to remember the (very poor) locals telling me they also have to take antimalarials in the dangerous season. Since it turned out I was not there during the dangerous season I did not use most of my medicine. But that's just me - don't copy me!
Again I am not an expert on mosquito borne diseases. This is mostly stuff I've heard from people in my travels with a bit of Googling to back some of it up. For real advice check with a health professional.
You write that there's no vaccine for dengue. Well, that's not true. A dengue vaccine exists. It has been developed by the Sanofi Pasteur laboratories. It's called Dengvaxia (CYD-TDV). It has already been licensed and has proved efficient in countries where it has been tested, see WHO and The Borgen Project. It took about 20 years to be developed.
Malaria is a serious and sometimes fatal disease transmitted by mosquitoes and causes symptoms that typically include fever, fatigue, vomiting and headaches. In severe cases it can cause yellow skin, seizures, coma or death.
People living in the areas of Malaria high risk (who have recently survived an infection), re-infection typically causes milder symptoms, however partial resistance disappears over months to years if there is no ongoing exposure to malaria.
However due to the high levels of mortality and morbidity caused by malaria—especially the P. falciparum (most deadly) species—it has placed the greatest selective pressure on the human genome in recent history.
I can't address dengue fever but with malaria it's possible for it to lie dormant in the body and then come back. If infection gave immunity this wouldn't happen.
I've come down with it three times this way (I haven't been in the malaria zone since the initial infection) and each time has been about the same (albeit quite mild.)