Great topic and great reply!
Affiliate marketing will evolve and change. It always has and will continue to.
As the industry has evolved there were many changes that made some people cry "affiliate marketing is dead." Through each of these industry transitions AM evolved and adapted and each time got stronger.
New advances in technology and user behavior will create change (like Web 2.0 for example). And the smart affiliates will just evolve. There's too much money in this industry for it to ever just go away.
The other important thing to realize is that the skills you develop can be stepping stones to many other things. So if AM ever did get rough you'd be equipped to move into direct sales, dropshipping or whatever.
Looking 40 years into the future is impossible though. Will there even be cars in 40 years or cell phones? Not sure - those industries could be totally gone and replaced by hovercraft and brain implanted tele chips.
It's good to look ahead. Just be sure you don't let yourself catch "analysis paralysis", one of the deadliest affiliate afflictions. "Make hay while the sun shines" as they say. And since any business, especially sales, can have it's ups and downs, always save a large percentage of what you make to live on during the lean times, if needed.