Re: How to name variables in a program?
- From: August Karlstrom <fusionfive@xxxxxxxxx>
- Date: Mon, 30 May 2005 18:49:04 GMT
Phlip wrote:
August Karlstrom wrote:
The `=' symbol has been used for ages (and still is) to denote equality. To use `=' for assignment and `==' for equality is just downright stupid. Moreover it's something that has to be explained in every introduction to a language from the C syntax family:
"`x = x + y;' might seem like a strange statement, but..."
There's a world of difference between a software program and a math proof. (Specifically, the former works closer to reality.)
Explaining that to newbs will help explain why _nothing_ obeys pure math, not = nor + nor * nor f() nor anything else in a programming language.
Except for side effects, overflow, underflow and the inexact nature of floating point numbers, I'd say that most expressions do have the expected "mathematical" semantics.
You still haven't explained why `i' is not a recommended name for a local variable.
-- August .
- Follow-Ups:
- Re: How to name variables in a program?
- From: Phlip
- Re: How to name variables in a program?
- 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
- How to name variables in a program?
- Prev by Date: Re: How to name variables in a program?
- Next by Date: Re: How to name variables in a program?
- Previous by thread: Re: How to name variables in a program?
- Next by thread: Re: How to name variables in a program?
- Index(es):