Not true outside of the Valley and other niche fields, like finance, and even in those places it isn't that often that folks retire early. The average salaries for developers tend to be higher across the board, but not "retire by 40 or even 50" higher.