Re: Why (or not) use single letter variable names?

From: Ben Pfaff (blp_at_cs.stanford.edu)
Date: 12/10/04


Date: Fri, 10 Dec 2004 13:48:34 -0800


"Dan Piponi" <google01@sigfpe.com> writes:

> Why do mathematicians use single letter variable names (even when their
> work is intended to be read by others) when programmers are typically
> taught to use descriptive variable names?

Mathematicians don't just write equations down on paper (or
computer). They write papers that include equations. The papers
(should) do a good job of explaining the variables.

Programmers write code that is usually meant to be
self-explanatory. They don't usually intend their code to be
part of an explanatory paper (literate programs excepted). If
they use long variable names, then their programs need fewer
comments.

-- 
Ben Pfaff 
email: blp@cs.stanford.edu
web: http://benpfaff.org


Relevant Pages