In theory, an aspie can be a good teacher. However, junior high kids, and to a lesser extent, high school kids, may start taking advantage of the teacher when they notice AS-like personality traits. Kindergarten, grade school, or elementary school kids are less likely to really take advantage of the teacher, although they'll think that the teacher is "nice, but a little strange".
For college professors, it's a completely different story. College students are far less likely to take advantage of the professor, except maybe to get extra credit or to justify wrong answers. Also, professors, expecially computer science professors, are expected to be a little eccentric (academia's term for "strange"), and the college environment is far more forgiving for aspies.