In the future, of course, no one will need to be lonely. We will have holodecks, like Star Trek, and we will simply create the people we want around us. They will perform the way we want them to perform and they will be our friends. If one of them fails us or, through faulty programming, betrays us, we can just delete that person or do whatever reprogramming is needed. They can look and act the way we want them to look and act. That should cure loneliness forever.