In The Moon Is A Harsh Mistress and, as I recall, in Stranger In A Strange Land, my man Robert suggests that marriage will evolve in the future into all kinds of different, flexible alternatives. Everyone will be cool and groovy with whatever floats your boat.
In Harsh Mistress, the hero has a line marriage, where a couple starts the line and then after a while, a new, young wife is added to the mix making 3. Then a new, young husband is added, making 4. Then another wife making 5. Then another husband making, so long as no one has died, 6. And so on. People die and sometimes people are "divorced," but on the whole, the family is one, big, happy cluster off into infinity with the kids being raised communally.
Bob has plenty of prose devoted to how awesome this all is. He takes aim at prudes who think there should be monogamy, sex belongs within marriage, prostitution is a bad idea and so forth. What a bunch of dummies! Life would be much better if we all just ditched our hangups about sex and stuff like that.
Robbie didn't believe a word of this. His heroes always hook up with a single girl. In fact, their lady love is one of their big motivations. When the couple* comes home from slaying the aliens or freeing the planet, they ride off into the sunset together with no one else involved. At the end of Harsh Mistress, Manuel (the hero) definitely does not find Wyoming (the heroine) just getting out of bed after having slept with husband 7b in their line marriage.
In short, Robert Heinlein wanted you to think he was a full on commune-living hippie when it came to sex, but when it came right down to it, his alter-egos weren't having any of that.
|Love ya, buddy, but you've got no one fooled when it comes to that modern marriage stuff.|