Re: How to name variables in a program?
- From: "Phlip" <phlip_cpp@xxxxxxxxx>
- Date: Mon, 30 May 2005 23:33:09 GMT
August Karlstrom wrote:
> In mathematics
The problem with math is mathematicians are too smart, so they don't have to
be clear.
> Note that single letter variable names are generally preferred for
> (trivial) loop variables as long names obscures the code. Compare
>
> FOR k := 0 TO LEN(a) DO
> a[k] := 0
> END
Whence Ruby's
a.each { |q| consider(q) }
The k went away entirely. q refers to a[k].
(But if it's an imediate value, like an integer, you can't = 0 it. So
a.collect{0} or something.)
--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand
.
- References:
- How to name variables in a program?
- From: SerGioGio
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- From: August Karlstrom
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- From: August Karlstrom
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- From: August Karlstrom
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- From: August Karlstrom
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- From: August Karlstrom
- How to name variables in a program?
- Prev by Date: Re: Get excel work*** names using ODBC
- Next by Date: Re: Get excel work*** names using ODBC
- Previous by thread: Re: How to name variables in a program?
- Next by thread: Re: How to name variables in a program?
- Index(es):