agreed. I'd add the condition that it sorta depends on who you're working for.
10 yrs at Google will be viewed differently from 10 yrs at at&t. The former will still leave you with a good chance, but probably at salary level nobody could match. The other one, you better never lose that job without starting your own company.