I read on Wikipedia that the first version of TeX was written in SAIL. However, does anyone know what language later versions (i.e the current one) are implemented in?
TeX was rewritten in Pascal. Actually, using a literate programming system called WEB, invented by Knuth himself. This system uses Pascal for the programming an TeX for the documentation.
The source code of TeX was published as a book: http://www.amazon.com/Computers-Typesetting-B-TeX-Program/dp/0201134373.
TeX is written in WEB (a literate programming language created by D. E. Knuth).
Originally, WEB source was translated into Pascal (a subset of Pascal) via
Today, TeXLive uses
MikTeX must use a similar system to produce C/C++.