Re: Why (or not) use single letter variable names?
From: Narasimham (mathma18_at_hotmail.com)
Date: 12/12/04
- Next message: JustSomeGuy: "Re: Simulate Web Form Input."
- Previous message: CBFalconer: "Re: Complete collection of Pascal Users Group newsletters"
- In reply to: beliavsky_at_aol.com: "Re: Why (or not) use single letter variable names?"
- Next in thread: Richard Mathar: "Re: Why (or not) use single letter variable names?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Dec 2004 09:06:21 -0800
beliavsky@aol.com wrote:
> >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?
...
> If I am trying to program the Black Scholes formula (for example), >
it is much better for me to
> define a function (in Fortran, for illustration)
>
> real function
> call_price(spot,strike,volatility,time_to_exp,rate,div_yield)
> real :: spot,strike,volatility,time_to_exp,rate,div_yield
> ! some code
> end function call_price
...
I prefer writing a smaller obvious name or abbreviation with a comment
line when necessary. That way it serves twin purposes of brevity and
explanation.
- Next message: JustSomeGuy: "Re: Simulate Web Form Input."
- Previous message: CBFalconer: "Re: Complete collection of Pascal Users Group newsletters"
- In reply to: beliavsky_at_aol.com: "Re: Why (or not) use single letter variable names?"
- Next in thread: Richard Mathar: "Re: Why (or not) use single letter variable names?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|