8 year support on MacBook Pros I currently use a "Mid 2010" MacBook Pro and was able to install Sierra and XCode 8.3 without any issues.

I would like to use this MBP for some two or three more years, however a person told me that Apple has an "8 year support window" and that 2017 is the last year in which I'll be able to update to the latest OS and install the latest XCode, etc.

I've Googled but couldn't find anything stating a similar policy. Does this have any truth to it? Is it possible to know how much longer I'll be able to install MacOS and XCode updates?
There is no official timeframe that Apple hardware will support the latest operating system or versions of particular software. It will vary depending on the type of enhancements that occur in hardware and what impact this has in terms of what the latest software needs in order to be able to perform certain tasks.

The person who told you that Apple has an "8 year support window" may have been getting confused with Apple's policy on Vintage and obsolete products, but this relates only to hardware/parts support and has no implication in terms of the operating system and other software. 

In summary:


Vintage products are those that have not been manufactured for more than 5 and less than 7 years
Obsolete products are those that were discontinued more than 7 years ago.


However, even the above will have some exceptions depending on local laws.

Using macOS Sierra as a guide, it is officially supported on:


iMac: Late 2009 or newer
MacBook and MacBook Retina: Late 2009 or newer
MacBook Pro: Mid 2010 or newer
MacBook Air: Late 2010 or newer
Mac mini: Mid 2010 or newer
Mac Pro: Mid 2010 or newer


Source: Apple

As you can see, in some cases support goes back to 2009 models, while in others it goes back to 2010 models. Therefore, there is no official timeframe that Apple hardware will support the latest operating system or versions of particular software.