Humans always think in extremes: AI will "take over" or will "replace humans" or "replace all jobs." Orrrrrrrr "AI will solve all problems."
The reality is, history shows us this is never true. Remember Y2K? The Tower of Babel? It's usually something like @tomhodgins said; a happy medium. It gets me how some people like Ray Kurzweil, Elon Musk, Stephen Hawking, and so many other non-computer scienists keep talking about how AI will "take over" and all this. First of all, AI is made by humans, thus it will always have human errors. How could something made by a human not? The answer is, it can't. It took me a day and 6 hours to successfully get a 6GB video transferred from my iPhone to my computer. Why? Because Apple has a silly bug where when the video file gets a certain size, the file format is changed and unviewable/readable by a PC and even a Mac with the version of iOS that I have. I talked to 5 tech support technicians, tried it on my PC, my girlfriend's Mac, my Linux box... I tried Dropbox's App which, for lack of a better term, was a big pile of trash (i got a refund, don't worry), etc... I ended up having to upgrade my iCloud just to get it to work.
The point is, we haven't even perfected a simple file transfer yet. We get way to big for our britches and unfortunately, it sometimes results in terrible software and/or (now) death. I don't care if you make a program that can write itself, it will still have bugs, and we're going to find out if those bugs will be liveable.
Finally, most experienced AI developers admit that we are no where near this "super intelligence" state that the media and "philsophers" keep acting like we are and that in fact it may never come. I trust those people, and my own CS intuition over media hype and CEOs who have no idea what they're talking about.
That said, of course technology will continue to advance and AI will augment our society.
I want to leave you with one thing: What do little boys often have a hard time understanding that us adults can (sometimes) wrap our head arounds??? They often ask "Which one's better?" Sometimes there is no better, sometimes there is no winner, just like a programming language, AI will be a tool used for a job.
Last but not least, check out this equation and tell me what you think:
(All humans believe they have right to have children) + (current state of economy) + (AI supposedly going to take all jobs) = X
What's X?
Tech companies don't like to believe it, but technology is not the sole dictator of how society operates... We're terrible with this. We love to think that our ideas and our implementations are always going to forever change society when that's not always true. Practical need and emotional fulfillment is generally what wins in the end. Why would we replace all jobs and put 300 million people out of work? Humans like the feeling of accomplishment too, just like so many enjoy driving cars as well.