« Return to Thread: Another formatting question: Short variable names

Re: Another formatting question: Short variable names

by Blair Zajac :: Rate this Message:

Reply to Author | View in Thread

Bill Venners wrote:
> Hi All,
>
> How do people feel about hd for variables that will hold the head of a
> list, ls for list, etc. What about pred for predicate? Seems if there
> are some very commonly used variable names like that it could make
> things more readable, but head and list are just two characters longer
> each, so I question whether that wouldn't make code more readable in
> general.

If you're going to go short and this is for a since method, then h = head, t =
tail and p = predicate.

Blair

 « Return to Thread: Another formatting question: Short variable names